:root {
  --ink: #24382f;
  --muted: #78847e;
  --green: #267d67;
  --green-dark: #1d6452;
  --mint: #eaf4ed;
  --line: #e1e7e1;
  --paper: #fff;
  --bg: #f5f7f3;
  --radius: 15px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--green);
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 32px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.25;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 15px;
  font-weight: 650;
}
p {
  line-height: 1.65;
}
small,
.small {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.hint {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  margin-top: 7px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #859187;
  display: block;
  margin-bottom: 12px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 25px 0;
}
.spaced {
  margin-top: 18px;
}
.sidebar {
  width: 225px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 32px 20px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.campaign-promo-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.6px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 4px;
}
.workspace-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: #9ba69f;
  margin: 46px 12px 16px;
}
.side-nav {
  display: grid;
  gap: 5px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border-radius: 9px;
  color: #738078;
  font-weight: 500;
  font-size: 13px;
}
.side-nav a:hover {
  background: #f6f8f5;
}
.side-nav a.active {
  color: var(--green-dark);
  background: #eaf4ed;
  font-weight: 650;
}
.nav-icon {
  width: 20px;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}
.nav-dot {
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.sidebar-bottom {
  margin-top: auto;
}
.workspace-card {
  border: 1px solid var(--line);
  background: #fafbf9;
  border-radius: 10px;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
}
.workspace-card small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 5px;
}
.dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  background: #bdc5bf;
  border-radius: 50%;
  display: inline-block;
}
.dot.green {
  background: #4a9d77;
}
.logout {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 18px 8px 0;
  font-size: 12px;
}
.app-shell {
  margin-left: 225px;
}
.topbar {
  height: 74px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: #ffffffaa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.breadcrumb {
  color: var(--ink);
  margin-left: 10px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8eee4;
  color: #66775f;
  font-size: 10px;
  font-weight: 700;
}
.main-content {
  padding: 32px;
  max-width: 2000px;
  margin: auto;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 27px;
}
.page-heading p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}
.page-heading .eyebrow {
  margin-bottom: 9px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 2px 3px #203a2303;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.panel-heading p {
  font-size: 12px;
  margin-top: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  transition:
    background 0.15s,
    box-shadow 0.15s;
  min-height: 39px;
}
.btn:hover {
  background: var(--green-dark);
  box-shadow: 0 2px 5px #143a2514;
}
.btn.secondary {
  background: #fff;
  border-color: var(--line);
  color: #4a5c51;
}
.btn.secondary:hover {
  background: #f3f7f2;
}
.btn.ghost {
  background: transparent;
  color: #63736b;
  padding: 10px;
}
.btn.danger {
  color: #a84640;
  background: #fff5f2;
  border-color: #f5dcd5;
}
.btn.small {
  padding: 6px 10px;
  min-height: 30px;
}
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.icon-button {
  background: transparent;
  border: 0;
  font-size: 25px;
  color: var(--muted);
  padding: 0 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  font-size: 10px;
  padding: 5px 8px;
  background: #f0f3ee;
  color: #75846e;
  font-weight: 600;
  white-space: nowrap;
}
.badge.live {
  background: #e2f3e9;
  color: #28795c;
}
.badge.warning {
  background: #fff1da;
  color: #9a6e32;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 20px;
  line-height: 1.5;
}
input:not([type="checkbox"]),
textarea,
select {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dfe6df;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
  margin-top: 7px;
  min-width: 0;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
input::placeholder,
textarea::placeholder {
  color: #a3ada5;
  font-size: 12px;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #82b39e;
  box-shadow: 0 0 0 3px #267d6712;
}
textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.check {
  display: flex;
  gap: 9px;
  align-items: center;
  font-weight: 400;
  margin: 14px 0;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  margin: 0 0 20px;
  gap: 20px;
}
.switch-row small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin-top: 7px;
}
.switch-row input {
  appearance: none;
  width: 38px;
  height: 22px;
  border-radius: 30px;
  background: #cbd4ce;
  position: relative;
  transition: background 0.2s;
}
.switch-row input:before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.switch-row input:checked {
  background: var(--green);
}
.switch-row input:checked:before {
  transform: translateX(16px);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.form-footer {
  margin-top: 25px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 21px;
}
.form-footer .muted {
  margin-right: auto;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(230px, 330px);
  gap: 24px;
  align-items: start;
}
.info-card {
  background: #ecf1e8;
  border-radius: var(--radius);
  padding: 28px;
  color: #66795d;
}
.info-card h3 {
  font-size: 20px;
  line-height: 1.4;
  margin: 16px 0;
}
.info-card p {
  font-size: 13px;
  margin: 12px 0;
}
.campaign-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 850px);
  gap: 22px;
  align-items: start;
}
.campaign-layout > * {
  min-width: 0;
}
.campaign-layout select {
  min-width: 0;
  max-width: 100%;
}
.campaign-list {
  padding: 20px 13px;
}
.campaign-list h3 {
  padding: 0 8px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.campaign-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 14px 10px;
  color: #657267;
  margin: 4px 0;
}
.campaign-item.selected {
  background: var(--mint);
  color: var(--green-dark);
}
.campaign-item small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}
.campaign-item strong {
  font-size: 12px;
}
.variable-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
  color: var(--muted);
  font-size: 11px;
}
code {
  font-family: Consolas, monospace;
  background: #f1f4ee;
  color: #66805f;
  font-size: 11px;
  padding: 3px 5px;
  border-radius: 4px;
}
.invitation-variant {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--paper);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.invitation-variant .panel-heading {
  margin-bottom: 8px;
}
.invitation-variant label {
  margin-bottom: 0;
}
.upload-box {
  padding: 17px;
  border: 1px dashed #c8d5c7;
  background: #fafcf8;
  border-radius: 9px;
}
.upload-box input {
  border: 0;
  padding: 0;
  background: none;
  font-size: 12px;
}
.attachment-row {
  padding: 12px;
  background: var(--mint);
  border-radius: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}
.inline-form input {
  margin: 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 25px;
}
.metric {
  padding: 25px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.metric strong {
  display: block;
  font-size: 40px;
  letter-spacing: -2px;
  font-weight: 500;
  margin: 18px 0 8px;
}
.metric small {
  color: var(--muted);
  font-size: 10px;
}
.metric.mint {
  background: #eaf2e5;
  border-color: #dce7d5;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid #edf0e9;
  vertical-align: top;
}
th {
  font-weight: 500;
  color: var(--muted);
  font-size: 10px;
  background: #fafbf8;
  white-space: nowrap;
}
.error-cell {
  max-width: 320px;
  overflow-wrap: anywhere;
  color: #9c6358;
}
.status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.notice {
  background: #e5f1e7;
  border: 1px solid #c9dfce;
  padding: 14px 18px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 20px;
}
.notice.error {
  background: #fff4ee;
  border-color: #f0d8ce;
  color: #a65d44;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #203e31;
  color: white;
  padding: 15px 24px;
  border-radius: 10px;
  box-shadow: 0 8px 35px #122e3033;
  z-index: 100;
  font-size: 13px;
  max-width: 90vw;
}
.empty {
  padding: 65px 25px;
  text-align: center;
}
.empty p {
  color: var(--muted);
  font-size: 13px;
  margin: 14px 0 24px;
}
.empty-art {
  font-size: 42px;
  color: #8cb49a;
  margin-bottom: 18px;
}
.footnote {
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.7;
}
.client-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
.client-grid .panel-heading {
  margin-bottom: 15px;
}
.client-grid details {
  margin-top: 16px;
  font-size: 12px;
}
.client-grid summary {
  cursor: pointer;
  color: var(--green);
  padding: 8px 0;
}
.event-message {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.flow-toolbar {
  padding: 14px 17px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  border-radius: 11px;
  flex-wrap: wrap;
}
.flow-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}
.flow-identity select {
  border: 0;
  margin: 0;
  padding: 5px 25px 5px 0;
  background: transparent;
  max-width: 220px;
  font-weight: 600;
  font-size: 13px;
}
.editor {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr) 292px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
  min-height: 610px;
  height: calc(100vh - 322px);
}
.canvas-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.block-palette {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  min-height: 59px;
}
.block-palette span {
  font-size: 8px;
  letter-spacing: 1px;
  margin-right: 6px;
}
.block-palette button {
  padding: 7px 8px;
  background: #f6f8f3;
  border: 1px solid #e5ebe1;
  color: #63735b;
  border-radius: 6px;
  font-size: 10px;
}
.block-palette button:hover {
  border-color: #89ae92;
  color: var(--green);
}
.palette-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.palette-group + .palette-group { border-top: 1px solid var(--line); padding-top: 9px; }
.palette-group > span { min-width: 105px; }
.flow-node[data-kind="contact"] .node-symbol { background: #e8f1fb; color: #537ba6; }
.flow-node[data-kind="set_variable"] .node-symbol { background: #f4eddd; color: #9c7733; }
.flow-node[data-kind="variable_condition"] .node-symbol { background: #f4e9d9; color: #a57a32; }
.flow-node[data-kind="random"] .node-symbol { background: #f0e9fa; color: #8a64ae; }
.flow-canvas {
  overflow: auto;
  position: relative;
  flex: 1;
  background-color: #f8faf6;
  background-image: radial-gradient(#d9e2d5 1px, transparent 1px);
  background-size: 20px 20px;
  min-height: 350px;
  outline: none;
}
.canvas-world {
  width: 1900px;
  height: 1150px;
  position: relative;
  transform-origin: top left;
}
.canvas-world > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: #a1b9a2;
}
.canvas-world path.edge {
  stroke: #a9bca5;
  stroke-width: 2;
  fill: none;
  marker-end: url(#arrow);
}
.canvas-world path.edge.active {
  stroke: #267d67;
  stroke-width: 2.5;
}
.flow-node {
  width: 255px;
  position: absolute;
  background: white;
  border: 1px solid #d9e3d6;
  border-radius: 11px;
  box-shadow: 0 4px 14px #2b4c2610;
  font-size: 12px;
  outline: none;
}
.flow-node.selected {
  border-color: var(--green);
  box-shadow:
    0 0 0 3px #267d6715,
    0 7px 18px #2b4c2610;
}
.node-heading {
  padding: 13px 15px;
  border-bottom: 1px solid #eef1eb;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.node-heading:active {
  cursor: grabbing;
}
.node-symbol {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: #e7f2e9;
  color: #4c8b63;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.node-heading strong {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.node-heading small {
  margin-left: auto;
  color: #a0aba1;
  font-size: 9px;
}
.node-content {
  padding: 14px 15px;
  line-height: 1.65;
  color: #798575;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  max-height: 115px;
  overflow: hidden;
}
.node-output {
  min-height: 32px;
  border-top: 1px solid #eef1eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 8px 15px;
  color: #6d8065;
  background: #fafcf8;
  font-size: 10px;
  gap: 8px;
}
.node-output:last-child {
  border-radius: 0 0 11px 11px;
}
.node-port {
  width: 12px;
  height: 12px;
  background: white;
  border: 2px solid #85a781;
  border-radius: 50%;
  padding: 0;
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  cursor: crosshair;
}
.node-port.input {
  left: -7px;
  right: auto;
  top: 26px;
}
.node-port.pending {
  background: var(--green);
  box-shadow: 0 0 0 4px #267d6730;
}
.flow-node[data-kind="condition"] .node-symbol {
  background: #fff1d9;
  color: #b49145;
}
.flow-node[data-kind="operator"] .node-symbol {
  background: #f1e9f8;
  color: #9a79b2;
}
.flow-node[data-kind="question"] .node-symbol {
  background: #e7eff8;
  color: #7497b2;
}
.flow-node[data-kind="end"] .node-symbol {
  background: #eef0eb;
  color: #818a75;
}
.flow-node[data-kind="promo"] .node-symbol {
  background: #f9eade;
  color: #bd8a64;
}
.canvas-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  gap: 15px;
  background: #fff;
  font-size: 9px;
  color: #97a191;
}
.zoom-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}
.zoom-controls button {
  border: 1px solid var(--line);
  background: #fff;
  color: #6b7a65;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 10px;
}
.inspector {
  border-left: 1px solid var(--line);
  padding: 21px;
  overflow: auto;
  background: #fff;
}
.inspector .eyebrow {
  font-size: 9px;
}
.inspector h3 {
  font-size: 17px;
}
.inspector label {
  font-size: 11px;
  margin-top: 17px;
}
.inspector input,
.inspector select,
.inspector textarea {
  font-size: 12px;
  padding: 9px 10px;
}
.inspector textarea {
  min-height: 105px;
}
.inspector .hint {
  font-size: 10px;
}
.inspector .divider {
  margin: 20px 0;
}
.inspector .mini-card {
  border: 1px solid var(--line);
  background: #fafcf8;
  padding: 12px;
  border-radius: 9px;
  margin: 12px 0;
}
.mini-card label:first-child {
  margin: 0;
}
.mini-card .btn {
  margin-top: 10px;
}
.inspector .btn {
  font-size: 11px;
}
.inspector input[type="file"] {
  font-size: 10px;
  padding: 4px 0;
  border: 0;
}
.inspector .inspector-footer {
  margin-top: 25px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.preview-dialog {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0;
  width: 450px;
  max-width: 95vw;
  box-shadow: 0 25px 80px #10291e33;
  color: var(--ink);
}
.preview-dialog[open] {
  display: flex;
  flex-direction: column;
}
.preview-dialog > :not(.preview-messages) {
  flex-shrink: 0;
}
.preview-dialog::backdrop {
  background: #16291d66;
  backdrop-filter: blur(3px);
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}
.preview-header .small {
  margin-top: 5px;
}
.preview-options {
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-options .check {
  font-size: 11px;
}
.preview-messages {
  height: min(420px, 48vh);
  min-height: 90px;
  overflow: auto;
  background: #f3f6ef;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.bubble {
  border: 1px solid #e6ebe1;
  background: #fff;
  border-radius: 13px 13px 13px 3px;
  padding: 13px 15px;
  max-width: 90%;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  align-self: flex-start;
}
.bubble.user {
  background: #deeddf;
  border-color: #d1e3d3;
  align-self: flex-end;
  border-radius: 13px 13px 3px 13px;
}
.bubble small {
  display: block;
  color: #8b9a82;
  font-size: 10px;
  margin-top: 9px;
}
.preview-buttons {
  display: grid;
  gap: 5px;
  padding: 12px 18px;
}
.preview-buttons button,
.preview-buttons a {
  font-size: 12px;
  text-align: center;
  padding: 10px;
  border: 1px solid #dbe6d8;
  background: #f4f8f1;
  border-radius: 7px;
  color: #548054;
}
.preview-input {
  display: flex;
  padding: 13px 18px 18px;
  gap: 8px;
}
.preview-input input {
  margin: 0;
  font-size: 12px;
}
.preview-input button {
  padding: 10px;
}
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
}
.login-story {
  background: #eaf0e3;
  padding: 42px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  gap: 40px;
}
.login-story h1 {
  font-size: clamp(30px, 3.2vw, 51px);
  font-weight: 500;
  letter-spacing: -1.7px;
  line-height: 1.2;
  color: #35573b;
  margin: 20px 0;
}
.login-story p {
  color: #7f9278;
  font-size: 13px;
}
.login-story > small {
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #91a087;
}
.story-bubbles {
  margin: 35px 0;
  display: grid;
  gap: 13px;
  max-width: 350px;
}
.story-bubbles div {
  border: 1px solid #d8e3d1;
  background: #f8fbf4;
  color: #718568;
  padding: 15px 19px;
  border-radius: 12px;
  font-size: 12px;
  width: max-content;
  max-width: 100%;
}
.story-bubbles div:nth-child(2) {
  margin-left: 30px;
  background: #d7e7ce;
}
.login-form {
  width: 100%;
  max-width: 420px;
  margin: auto;
  padding: 30px;
}
.login-form h2 {
  font-size: 30px;
  font-weight: 550;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.login-form > p {
  font-size: 12px;
}
.login-form form {
  margin: 28px 0 20px;
}
.login-submit {
  width: 100%;
  margin-top: 27px;
}
.login-form .notice {
  margin-top: 20px;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #99bda9;
  outline-offset: 3px;
}
@media (min-width: 1700px) {
  .editor {
    grid-template-columns: 215px minmax(0, 1fr) 330px;
  }
  .main-content {
    padding: 38px 45px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 195px;
    padding: 28px 14px;
  }
  .app-shell {
    margin-left: 195px;
  }
  .main-content {
    padding: 25px 20px;
  }
  .editor {
    grid-template-columns: 190px minmax(0, 1fr) 260px;
  }
  .inspector {
    padding: 17px;
  }
  .campaign-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 245px;
  }
  .flow-toolbar .btn {
    padding: 9px 11px;
  }
  .flow-identity {
    gap: 8px;
  }
  .flow-identity select {
    max-width: 190px;
  }
  .flow-toolbar {
    gap: 10px;
  }
  .page-heading p {
    font-size: 12px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    width: 75px;
    padding: 24px 10px;
  }
  .sidebar .brand > span:not(.brand-mark),
  .workspace-label,
  .sidebar-bottom,
  .side-nav a > .nav-dot {
    display: none;
  }
  .sidebar .brand {
    justify-content: center;
  }
  .side-nav {
    margin-top: 35px;
  }
  .side-nav a {
    font-size: 0;
    justify-content: center;
    padding: 15px 10px;
  }
  .side-nav .nav-icon {
    font-size: 22px;
  }
  .app-shell {
    margin-left: 75px;
  }
  .topbar {
    padding: 0 20px;
    height: 60px;
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .info-card {
    max-width: none;
  }
  .campaign-layout {
    grid-template-columns: 1fr;
  }
  .campaign-list {
    display: flex;
    overflow: auto;
    align-items: center;
    gap: 10px;
  }
  .campaign-list h3 {
    padding: 0;
    min-width: 140px;
  }
  .campaign-item {
    min-width: 160px;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .editor {
    height: 670px;
  }
  .canvas-footer > span {
    display: none;
  }
  .canvas-footer {
    justify-content: flex-end;
  }
  .login-story {
    padding: 35px;
  }
}
@media (max-width: 640px) {
  .sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    padding: 9px 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand-mark {
    width: 38px;
    height: 38px;
  }
  .side-nav {
    display: flex;
    margin: 0;
    gap: 2px;
  }
  .side-nav a {
    padding: 9px 10px;
  }
  .side-nav .nav-icon {
    font-size: 20px;
  }
  .app-shell {
    margin: 0;
  }
  .topbar {
    display: none;
  }
  .main-content {
    padding: 23px 14px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
  }
  .page-heading .btn {
    padding: 9px 12px;
  }
  .editor {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
  }
  .canvas-column {
    height: 460px;
  }
  .inspector {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 550px;
  }
  .flow-toolbar {
    padding: 12px;
    gap: 13px;
  }
  .flow-toolbar .button-row {
    gap: 4px;
  }
  .flow-toolbar .btn {
    font-size: 10px;
    padding: 8px;
  }
  .flow-identity {
    flex-wrap: wrap;
  }
  .flow-identity select {
    max-width: 230px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 20px;
  }
  .stats-grid {
    gap: 8px;
  }
  .metric {
    padding: 16px 11px;
  }
  .metric strong {
    font-size: 30px;
  }
  .metric span {
    font-size: 10px;
  }
  .metric small {
    font-size: 8px;
  }
  .panel-heading {
    align-items: flex-start;
  }
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }
  .form-footer {
    flex-wrap: wrap;
  }
  .client-grid {
    grid-template-columns: 1fr;
  }
  .login-page {
    display: flex;
    flex-direction: column;
  }
  .login-story {
    min-height: 0;
    padding: 25px;
  }
  .login-story > div:not(.brand),
  .login-story > small {
    display: none;
  }
  .login-form {
    margin: 50px auto;
  }
  .login-story .brand {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.block-palette {
  flex-shrink: 0;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.crm-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crm-summary { display: flex; align-items: center; gap: 30px; padding: 22px 28px; margin-bottom: 20px; border: 1px solid #d9e9dc; border-radius: var(--radius); background: var(--mint); }
.crm-summary > div { display: flex; align-items: baseline; gap: 12px; flex-shrink: 0; }
.crm-summary strong { font-size: 32px; letter-spacing: -1px; }
.crm-summary p { max-width: 600px; color: #52665b; font-size: 13px; }
.crm-panel { margin-bottom: 22px; min-width: 0; }
.crm-toolbar { display: flex; align-items: flex-end; gap: 14px; }
.crm-toolbar label { margin: 0; min-width: 170px; }
.crm-toolbar .crm-search { flex: 1; }
.crm-toolbar button { height: 43px; }
.crm-selection, .crm-section-head, .crm-job-top, .crm-modal-head, .crm-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.crm-selection { margin: 20px 0; flex-wrap: wrap; }
.crm-table { min-width: 750px; }
.crm-panel .table-wrap { position: relative; }
.crm-table th:first-child, .crm-table td:first-child { width: 42px; padding-left: 8px; }
.crm-table input[type=checkbox], .crm-consent input { width: 17px; height: 17px; accent-color: var(--green); flex-shrink: 0; }
.crm-table td { vertical-align: middle; }
.crm-table td small { display: block; font-size: 11px; margin-top: 4px; }
.crm-person { display: flex; gap: 12px; align-items: center; }
.crm-person strong { display: block; font-size: 13px; }
.crm-person a { display: block; font-size: 12px; margin-top: 5px; }
.crm-avatar { width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.crm-avatar-empty { display: grid; place-items: center; background: #e6eee7; color: var(--green); font-size: 17px; font-weight: 600; }
.crm-person-large { margin: 24px 0; }
.crm-person-large .crm-avatar { width: 58px; height: 58px; }
.crm-person-large h3 { font-size: 20px; }
.crm-badge { display: inline-block; border-radius: 8px; padding: 5px 9px; font-size: 11px; background: #f0f2ee; color: #58665e; line-height: 1.4; }
.crm-status-sent, .crm-status-completed { background: #e4f4e9; color: #246742; }
.crm-status-queued, .crm-status-running, .crm-status-sending { background: #e4f0f9; color: #326480; }
.crm-status-paused, .crm-status-failed { background: #fcf0df; color: #895b1b; }
.crm-pagination { margin-top: 20px; font-size: 12px; color: var(--muted); }
.crm-modal { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 26px; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: var(--paper); box-shadow: 0 24px 80px #11271b33; overflow: auto; }
.crm-modal::backdrop { background: #132a245e; backdrop-filter: blur(3px); }
.crm-modal-head { margin-bottom: 20px; }
.crm-modal p { margin: 10px 0; }
.crm-modal h3 { margin-top: 18px; }
.crm-details { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 13px; }
.crm-details dt { color: var(--muted); }
.crm-details dd { margin: 0; overflow-wrap: anywhere; }
.crm-events article { padding: 14px 0; border-bottom: 1px solid var(--line); }
.crm-events p { white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-error { color: #9c3e32; font-size: 12px; overflow-wrap: anywhere; }
.crm-compose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; margin-bottom: 28px; }
.crm-compose h2 { margin-bottom: 22px; }
.crm-compose label { margin-top: 20px; }
.crm-variables { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.crm-variables .hint { margin: 0; }
#broadcast-length { margin-left: auto; }
.crm-chip { border: 1px solid var(--line); background: var(--mint); color: var(--green-dark); border-radius: 6px; padding: 5px 10px; font-size: 12px; }
.crm-upload { border: 1px dashed #bfccc1; border-radius: 10px; padding: 16px; background: #fafcf9; }
.crm-upload input { background: none; border: none; padding: 8px 0 0; box-shadow: none; width: 100%; }
.crm-guide ol { padding-left: 20px; color: #54695c; font-size: 13px; line-height: 1.7; }
.crm-guide li + li { margin-top: 12px; }
.crm-guide a { display: inline-block; margin-top: 14px; font-size: 13px; }
.crm-section-head { margin-bottom: 10px; }
.crm-job { padding: 24px 0; border-top: 1px solid var(--line); }
.crm-job:first-child { border-top: 0; }
.crm-job h3 { font-size: 16px; }
.crm-job progress { display: block; width: 100%; height: 6px; border: none; border-radius: 8px; overflow: hidden; margin: 18px 0 12px; accent-color: var(--green); }
.crm-job progress::-webkit-progress-bar { background: #edf1ec; }
.crm-job progress::-webkit-progress-value { background: var(--green); border-radius: 8px; }
.crm-job-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 18px; font-size: 12px; color: var(--muted); }
.crm-job-stats b { color: var(--ink); margin-left: 4px; }
.crm-job .crm-error { margin-bottom: 15px; }
.crm-message { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--mint); border: 1px solid #d8e6da; padding: 20px; border-radius: 14px 14px 14px 3px; font: inherit; line-height: 1.65; margin: 18px 0; }
.crm-test { display: flex; align-items: flex-end; gap: 12px; }
.crm-test label { flex: 1; margin: 0; }
.crm-test button { height: 43px; }
.crm-consent { display: flex; align-items: flex-start; gap: 10px; line-height: 1.5; }
.crm-consent input { margin: 2px 0 0; }
.crm-log-error { white-space: normal; overflow-wrap: anywhere; min-width: 150px; }
@media (max-width: 1100px) {
  .crm-compose-layout { grid-template-columns: minmax(0, 1fr); }
  .crm-guide { display: none; }
}
@media (max-width: 640px) {
  .crm-toolbar, .crm-summary { flex-direction: column; align-items: stretch; gap: 14px; }
  .crm-toolbar label { width: 100%; }
  .crm-summary { padding: 18px; }
  .crm-modal { padding: 20px; }
  .crm-modal-head h2 { font-size: 18px; }
  .crm-test { flex-direction: column; align-items: stretch; }
  .crm-details { grid-template-columns: 1fr; gap: 5px; }
  .crm-details dd { margin-bottom: 10px; }
  .crm-job-top { align-items: flex-start; }
  .crm-job-stats { gap: 12px; }
  .crm-section-head { align-items: flex-start; }
}
@media (max-width: 640px) {
  .side-nav a {
    font-size: 8px;
    flex-direction: column;
    gap: 5px;
    padding: 7px 5px;
    min-width: 45px;
  }
  .side-nav { min-width: 0; max-width: 100%; overflow-x: auto; }
  .canvas-column {
    height: 510px;
  }
  .flow-canvas {
    min-height: 300px;
  }
}

/* Project context stays visible, including on narrow screens. */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  transform: translateY(-200%);
  z-index: 20;
  padding: 12px 18px;
  border-radius: 8px;
  color: white;
  background: var(--green-dark);
}
.skip-link:focus { transform: translateY(0); }
.sidebar { overflow-y: auto; }
.sidebar .brand-mark { flex-shrink: 0; }
.workspace-card { overflow-wrap: anywhere; }
.workspace-label { margin-top: 28px; }
.sidebar-bottom { padding-top: 20px; }
.project-topbar {
  display: flex;
  height: auto;
  min-height: 98px;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.project-switcher {
  display: grid;
  gap: 4px;
  width: min(100%, 470px);
  min-width: 0;
}
.project-switcher label { margin: 0; font-size: 11px; color: var(--ink); }
.project-switcher select { margin: 0; font-size: 13px; }
.project-switcher .hint { margin: 0; overflow-wrap: anywhere; }
.project-topbar .topbar-right { flex-shrink: 0; flex-wrap: wrap; }
.project-topbar .logout { margin: 0; padding: 10px 0; }
.projects-link { font-weight: 600; }
.project-paused,
.project-settings-link { display: flex; align-items: center; gap: 18px; justify-content: space-between; }
.project-paused { background: #fff8e9; border-color: #eadbb7; color: #71521c; }
.project-paused p { margin-top: 3px; }
.project-paused .btn,
.project-settings-link .btn { flex-shrink: 0; }
.project-settings-link { margin-bottom: 24px; }
.project-settings-link h2,
.project-card h2 { overflow-wrap: anywhere; }
.project-settings-link .hint { margin-top: 8px; }
.projects-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); gap: 24px; align-items: start; }
.projects-list { display: grid; gap: 20px; min-width: 0; }
.project-card,
.project-create { min-width: 0; scroll-margin-top: 24px; }
.project-card:target { border-color: #82b39e; box-shadow: 0 0 0 3px #267d6712; }
.project-card .panel-heading { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.project-card .panel-heading > div { min-width: 0; flex: 1 1 160px; }
.project-card .panel-heading .badge { white-space: nowrap; }
.project-readiness { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; padding: 0; margin: 20px 0 0; font-size: 12px; }
.project-readiness .ready { color: var(--green-dark); }
.project-readiness .missing { color: #805f29; }
.callback-row { display: flex; align-items: stretch; gap: 8px; margin-top: 7px; }
.callback-row input { margin: 0; font-size: 12px; background: #f8faf7; }
.callback-row .btn { flex-shrink: 0; }
.project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 12px; }
.project-actions form { margin: 0; }
.project-settings { padding-top: 18px; margin-top: 20px; border-top: 1px solid var(--line); }
.project-settings summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--green-dark); line-height: 1.6; }
.project-settings summary:focus-visible { outline: 3px solid #99bda9; outline-offset: 4px; border-radius: 3px; }
.project-enable { margin-top: 20px; margin-bottom: 0; border-bottom: 0; border-top: 1px solid var(--line); padding-bottom: 0; }
.project-enable input { flex-shrink: 0; }
.project-card .form-footer { flex-wrap: wrap; }
.project-create .form-footer .btn { width: 100%; }
.broadcast-project { overflow-wrap: anywhere; }
@media (max-width: 1200px) {
  .projects-layout { grid-template-columns: minmax(0, 1fr); }
  .project-create { max-width: 760px; width: 100%; }
}
@media (max-width: 900px) {
  .project-paused,
  .project-settings-link { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .sidebar { gap: 10px; overflow-y: visible; }
  .sidebar .brand { flex-shrink: 0; }
  .side-nav { justify-content: flex-start; }
  .project-topbar { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .project-switcher { width: 100%; }
  .project-topbar .topbar-right { width: 100%; justify-content: space-between; }
  .project-topbar .logout { padding: 5px 0; }
  .projects-layout { gap: 20px; }
  .project-card,
  .project-create { scroll-margin-top: 85px; }
  .callback-row { flex-wrap: wrap; }
  .callback-row input { flex-basis: 100%; }
  .project-actions,
  .project-card .form-footer { align-items: stretch; flex-direction: column; }
  .project-actions .btn { width: 100%; }
  .project-card .form-footer > a { text-align: center; padding: 6px; }
}

/* Local Lucide SVGs: consistent strokes, no icon fonts or remote requests. */
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: -3px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.nav-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-icon .icon { width: 21px; height: 21px; }
.empty-art .icon { width: 36px; height: 36px; }
.node-symbol { display: inline-flex; align-items: center; justify-content: center; }
.block-palette button { display: inline-flex; gap: 6px; align-items: center; }
.block-palette .icon { width: 15px; height: 15px; }
.logout { display: inline-flex; gap: 7px; align-items: center; }
#broadcast-rename { max-width: 520px; }
/* The editor fills the app viewport; dialogs remain in the browser top layer. */
body.flow-fullscreen { overflow: hidden; }
body.flow-fullscreen .sidebar, body.flow-fullscreen .project-topbar,
body.flow-fullscreen > .skip-link { visibility: hidden; }
#flow-app.is-fullscreen {
  position: fixed; inset: 0; z-index: 900; padding: 12px;
  height: 100dvh; background: var(--bg, #f5f7f2);
  display: flex; flex-direction: column; gap: 8px; overflow: hidden;
}
#flow-app.is-fullscreen > .page-heading,
#flow-app.is-fullscreen > .footnote { display: none; }
#flow-app.is-fullscreen .flow-toolbar { margin: 0; flex-shrink: 0; padding: 10px 14px; }
#flow-app.is-fullscreen #flow-errors { margin: 0; max-height: 100px; overflow: auto; flex-shrink: 0; }
#flow-app.is-fullscreen .editor { flex: 1; height: auto; min-height: 0; max-height: none; }
#flow-app.is-fullscreen .canvas-column { height: 100%; min-height: 0; }
#flow-app.is-fullscreen .flow-canvas { min-height: 0; }
#flow-app.is-fullscreen .inspector { min-height: 0; max-height: none; }
.schedule-days { border: 1px solid var(--line); border-radius: 8px; margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px; }
.inspector .schedule-days label { margin: 0; }
.preview-controls { padding: 0 18px 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 36dvh; overflow: auto; }
.preview-controls label { font-size: 11px; margin: 0; }
.preview-controls input { padding: 6px; min-width: 0; }
.preview-controls p { grid-column: 1 / -1; margin: 0; }
.preview-dialog { max-height: 95dvh; }
@media (max-width: 760px) {
  #flow-app.is-fullscreen { padding: 5px; }
  #flow-app.is-fullscreen .editor { display: grid; grid-template-columns: 1fr; grid-template-rows: auto minmax(160px, 1fr) minmax(140px, .8fr); }
  #flow-app.is-fullscreen .inspector { overflow: auto; padding: 10px; }
  #flow-app.is-fullscreen .flow-toolbar .btn { padding: 7px; font-size: 11px; }
  .preview-controls { grid-template-columns: 1fr; }
}

/* The block library lives beside the canvas, with its own scrolling area. */
.block-library { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #fbfcfa; border-right: 1px solid var(--line); }
.library-toggle { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 13px; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.library-toggle:hover { background: var(--green-light, #eaf4ef); }
.library-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 10px; }
.block-library .block-palette { display: block; padding: 12px; min-height: 0; background: transparent; border: 0; }
.block-library .block-palette + .block-palette { padding-top: 0; }
.block-library .palette-group { display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
.block-library .palette-group + .palette-group { margin-top: 13px; padding-top: 13px; }
.block-library .palette-group > span { margin: 0 0 6px; font-size: 8px; }
.block-library .palette-group button { width: 100%; justify-content: flex-start; text-align: left; font-size: 11px; padding: 9px 8px; background: #fff; }
.editor.library-collapsed { grid-template-columns: 44px minmax(0, 1fr) 292px; }
.editor.library-collapsed .library-title { display: none; }
@media (min-width: 1700px) { .editor.library-collapsed { grid-template-columns: 44px minmax(0, 1fr) 330px; } }
@media (min-width: 761px) and (max-width: 1200px) { .editor.library-collapsed { grid-template-columns: 44px minmax(0, 1fr) 260px; } }
@media (max-width: 760px) {
  .block-library { position: relative; border-right: 0; border-bottom: 1px solid var(--line); flex-shrink: 0; z-index: 5; }
  .editor.library-collapsed .library-title { display: inline; }
  .library-toggle { min-height: 43px; padding: 10px 12px; border-bottom: 0; }
  .library-content { position: absolute; top: 100%; left: 0; width: min(240px, 100%); max-height: min(65dvh, 480px); border: 1px solid var(--line); border-radius: 0 0 12px 0; background: #fbfcfa; box-shadow: 5px 12px 24px #10291e22; }
}
.contact-card { margin: 16px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.journey { margin: 12px 0; overflow-wrap: anywhere; }
.journey li { margin: 10px 0; padding-left: 6px; }
.journey p { white-space: pre-wrap; }
