:root {
  --bg: #e9eaee;
  --surface: #ffffff;
  --ink: #17181c;
  --muted: #8a8f99;
  --line: #eef0f3;
  --lime: #c9f24d;
  --teal: #159c9c;
  --purple-soft: #e7e0fc;
  --purple: #a78bfa;
  --blue-soft: #d9e8fd;
  --green-soft: #d2f4e2;
  --green: #34d399;
  --navy: #101a2f;
  --navy-2: #182747;
  --navy-line: rgba(255, 255, 255, 0.09);
  --navy-text: #98a3b9;
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

/* the hidden attribute must beat any display rule below */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  padding: 22px;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 26px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--lime);
  display: grid;
  place-items: center;
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.col-main,
.col-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* ---------- stat cards ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat {
  padding: 17px 18px;
  border-radius: 18px;
}

.stat-purple {
  background: var(--purple-soft);
}

.stat-green {
  background: var(--green-soft);
}

.stat-blue {
  background: var(--blue-soft);
}

.stat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #4a4f59;
}

.stat-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.75);
  display: grid;
  place-items: center;
}

.stat-icon svg {
  width: 13px;
  height: 13px;
}

.stat strong {
  display: block;
  margin: 12px 0 4px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.8px;
}

.stat small {
  color: #6a707b;
  font-size: 11px;
}

/* ---------- cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: #f4f5f7;
  color: #5c626d;
  font-size: 11px;
  font-weight: 500;
}

.chip-green {
  background: var(--green-soft);
  color: #1b7a55;
}

.chip-warn {
  background: #fdf1dc;
  color: #94640f;
}

/* ---------- chart ---------- */

.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 168px;
}

.chart-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.chart-bars {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}

.bar {
  width: 11px;
  min-height: 4px;
  border-radius: 6px;
  background: var(--purple);
  transition: height 0.3s ease;
}

.bar-green {
  background: var(--green);
}

.chart-label {
  font-size: 11px;
  color: var(--muted);
}

.legend {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sq {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  display: inline-block;
}

.sq-green {
  background: var(--green);
}

.sq-purple {
  background: var(--purple);
}

/* ---------- table ---------- */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 0 12px 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--muted);
}

.table td {
  padding: 13px 12px;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.table td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.table .empty td {
  text-align: center;
  color: var(--muted);
  padding: 26px 12px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.badge-pending {
  background: #fef3c7;
  color: #a16207;
}

.badge-confirmed {
  background: var(--green-soft);
  color: #1b7a55;
}

.badge-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-sent {
  background: var(--blue-soft);
  color: #1d4ed8;
}

.badge-queued {
  background: #f4f5f7;
  color: #5c626d;
}

.badge-failed {
  background: #fee2e2;
  color: #b91c1c;
}

/* ---------- promo / test form ---------- */

.promo {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.promo h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.promo p {
  margin: 6px 0 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
}

.promo-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-size: 12.5px;
}

.promo-form input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.promo-form input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 0;
}

.promo-form button {
  margin-top: 6px;
  padding: 11px 14px;
  border: 0;
  border-radius: 11px;
  background: var(--lime);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.promo-form button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.promo-note {
  margin: 12px 0 0;
  font-size: 11.5px;
  min-height: 16px;
  color: rgba(255, 255, 255, 0.9);
}

/* ---------- rows + feed ---------- */

.rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #555b66;
}

.row code {
  font-size: 11px;
  color: var(--ink);
  background: #f4f5f7;
  padding: 4px 8px;
  border-radius: 7px;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 260px;
  overflow-y: auto;
}

.feed li {
  display: flex;
  gap: 10px;
  font-size: 12px;
  line-height: 1.45;
}

.feed i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: var(--purple);
}

.feed .i-sent {
  background: #3b82f6;
}

.feed .i-confirmed {
  background: var(--green);
}

.feed .i-cancelled,
.feed .i-error {
  background: #ef4444;
}

.feed .i-reply {
  background: #f59e0b;
}

.feed time {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
}

.feed-empty {
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- buttons ---------- */

.btn {
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.btn-lime {
  background: var(--lime);
  color: var(--ink);
  font-weight: 600;
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: #555b66;
}

.btn-ghost:hover {
  background: #f7f8f9;
}

.btn-danger {
  color: #b91c1c;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}


/* ---------- automations list ---------- */

.auto-list { display: flex; flex-direction: column; gap: 14px; }
.auto-card.is-off { opacity: 0.55; }

.auto-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.auto-head h2 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.auto-head .chip + .chip { margin-left: 6px; }
.auto-actions { display: flex; gap: 7px; }

.auto-desc {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #5c626d;
}

.auto-summary {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f8f9;
  font-size: 12.5px;
  color: #4a4f59;
}

.hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- builder shell ---------- */

.builder { display: flex; flex-direction: column; padding-bottom: 26px; }
.builder-bar { margin-bottom: 16px; }

.builder-body {
  flex: 1;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  min-height: 520px;
}

.builder-body:has(.inspector:not([hidden])) {
  grid-template-columns: 210px minmax(0, 1fr) 290px;
}

.palette {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  height: fit-content;
}

.palette h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; }

.palette-group {
  margin: 16px 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: grab;
  background: var(--surface);
}

.palette-item:hover { border-color: #dcdfe4; background: #fafbfc; }

.palette-item.is-locked {
  opacity: 0.45;
  cursor: not-allowed;
  background: #fbfbfc;
}

.palette-item.is-locked:hover { border-color: var(--line); background: #fbfbfc; }

.palette-lock {
  margin: 10px 2px 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.node-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.icon-trigger { background: #7c6cf5; }
.icon-trigger2 { background: #6d5ce0; }
.icon-send { background: #22b07d; }
.icon-condition { background: #e8a33d; }
.icon-delay { background: #ef5a5a; }
.icon-status { background: #e8893d; }

/* ---------- canvas ---------- */

.canvas-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: #fbfbfc;
  background-image: radial-gradient(#d9dce1 1px, transparent 1px);
  background-size: 18px 18px;
  touch-action: none;
}

.canvas { position: absolute; inset: 0; transform-origin: 0 0; }

.edges {
  position: absolute;
  inset: 0;
  width: 4000px;
  height: 3000px;
  overflow: visible;
  pointer-events: none;
}

.edge { fill: none; stroke: #b9bec7; stroke-width: 1.8; stroke-dasharray: 5 4; }
.edge-live { stroke: var(--teal); stroke-dasharray: 3 3; }

.canvas-hint {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translateX(-50%);
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  pointer-events: none;
}

.zoom-controls {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.zoom-controls button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: #555b66;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* ---------- nodes ---------- */

.node {
  position: absolute;
  width: 220px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(20, 22, 26, 0.07);
  font-size: 12px;
  cursor: grab;
  user-select: none;
}

.node.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(21, 156, 156, 0.18);
}

.node-head {
  padding: 9px 12px;
  border-radius: 11px 11px 0 0;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
}

.node-trigger .node-head { background: #7c6cf5; }
.node-condition .node-head { background: #e8a33d; }
.node-send .node-head { background: #22b07d; }
.node-delay .node-head { background: #ef5a5a; }
.node-status .node-head { background: #e8893d; }

.node-body { padding: 11px 12px; }
.node-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.node-row {
  padding: 7px 9px;
  margin-bottom: 5px;
  border-radius: 8px;
  background: #f4f6f8;
  font-size: 11.5px;
  color: #4a4f59;
}

.node-msg {
  padding: 9px 10px;
  border-radius: 8px;
  background: #f4f6f8;
  font-size: 11px;
  line-height: 1.6;
  max-height: 96px;
  overflow: hidden;
  color: #4a4f59;
}

.node-logic {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: #fde9c8;
  color: #a16207;
  font-size: 10px;
  font-weight: 600;
}

.node-outs { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 12px; }

.node-out {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
}

.out-yes { background: var(--green-soft); color: #1b7a55; }
.out-no { background: #fee2e2; color: #b91c1c; }
.out-btn { background: #eaf4ff; color: #1d4ed8; }

.node-out span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handle {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: #8a8f99;
  display: block;
}

.handle-in {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: #e8a33d;
}

.handle-out { background: var(--teal); cursor: crosshair; }
.handle-out:hover { transform: scale(1.25); }

.handle-bottom {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
}

.node-out .handle-out { margin-right: -16px; }

.node-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.node:hover .node-remove { opacity: 1; }

/* ---------- inspector ---------- */

.inspector {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  height: fit-content;
  max-height: 640px;
  overflow-y: auto;
}

.btn-row { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-bottom: 7px; }

.btn-row input {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 12px;
}

/* ---------- buttons ---------- */

.btn {
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.btn-lime { background: var(--lime); color: var(--ink); font-weight: 600; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: #555b66; }
.btn-ghost:hover { background: #f7f8f9; }
.btn-danger { color: #b91c1c; }

.icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ---------- modal + form ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 22, 26, 0.45);
  overflow-y: auto;
}

.modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
}

.modal-sm { width: min(430px, 100%); }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12px; font-weight: 600; color: #3f444d; }
.field small { font-size: 11px; color: var(--muted); line-height: 1.5; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.field textarea { resize: vertical; line-height: 1.6; }

.logic-toggle { display: flex; gap: 8px; }

.logic {
  padding: 6px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: #6c717c;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.logic.is-on { background: var(--lime); border-color: var(--lime); color: var(--ink); }

.rule { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr auto; gap: 6px; margin-bottom: 7px; }

.rule select,
.rule input {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 11.5px;
  min-width: 0;
}

.form-actions { display: flex; justify-content: flex-end; gap: 9px; }

.badge-shipped { background: var(--blue-soft); color: #1d4ed8; }
.badge-delivered { background: var(--purple-soft); color: #5b45a8; }

@media (max-width: 1200px) {
  .builder-body,
  .builder-body:has(.inspector:not([hidden])) {
    grid-template-columns: minmax(0, 1fr);
  }

  .canvas-wrap { min-height: 460px; }
}

.palette-ghost {
  position: fixed;
  z-index: 50;
  width: 180px;
  margin: 0;
  pointer-events: none;
  opacity: 0.9;
  box-shadow: 0 8px 20px rgba(20, 22, 26, 0.15);
}

/* ---------- public / legal pages ---------- */

.legal {
  max-width: 860px;
  margin: 0 auto;
}

.legal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 6px 4px 22px;
}

.legal-head .brand {
  padding: 0;
  text-decoration: none;
  color: var(--ink);
}

.legal-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.legal-nav a {
  padding: 8px 13px;
  border-radius: 10px;
  color: #555b66;
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}

.legal-nav a:hover {
  background: var(--surface);
}

.legal-nav a.is-active {
  background: var(--lime);
  color: var(--ink);
  font-weight: 600;
}

.legal-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 44px 48px 40px;
  line-height: 1.7;
  font-size: 14px;
  color: #2f333b;
}

.legal-card h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--ink);
}

.legal-meta {
  margin: 0 0 30px;
  color: var(--muted);
  font-size: 12.5px;
}

.legal-card h2 {
  margin: 30px 0 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.legal-card p {
  margin: 0 0 12px;
}

.legal-card ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal-card li {
  margin-bottom: 5px;
}

.legal-card a {
  color: var(--teal);
}

.legal-lead {
  font-size: 15.5px;
  color: #3f444d;
}

.legal-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}

.legal-step {
  padding: 18px;
  border-radius: 18px;
}

.legal-step strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  color: var(--ink);
}

.legal-step p {
  margin: 0;
  font-size: 12.5px;
  color: #4a4f59;
}

.legal-company {
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fafbfc;
}

.legal-company h2 {
  margin-top: 0;
}

.legal-company p {
  margin: 0 0 4px;
}

.legal-company dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 6px 14px;
  margin: 0;
}

.legal-company dt {
  color: var(--muted);
  font-size: 12.5px;
}

.legal-company dd {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

.legal-foot {
  padding: 26px 4px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.legal-foot a {
  color: #555b66;
  text-decoration: none;
}

@media (max-width: 720px) {
  .legal-card {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .legal-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-company dl {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- shared bits ---------- */

.btn-dark {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 14px;
  border-radius: 13px;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid #d9efc3;
  border-radius: 999px;
  background: #f1fbdf;
  color: #3f6b12;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.pill-tag::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7cc32c;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  color: #3f444d;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.checklist li::before {
  content: '✓';
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: var(--green-soft);
  color: #1b7a55;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.form-note {
  margin: 0;
  color: #1b7a55;
  font-size: 12px;
  min-height: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.row-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.row-stack code {
  word-break: break-all;
  white-space: normal;
  line-height: 1.5;
}

/* ---------- landing ---------- */

.site-body {
  padding: 0;
  background: #f5f6f8;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(245, 246, 248, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e6e8ec;
}

.site-nav .brand {
  padding: 0;
  text-decoration: none;
  color: var(--ink);
}

.site-links {
  display: flex;
  gap: 4px;
}

.site-links a {
  padding: 8px 13px;
  border-radius: 10px;
  color: #555b66;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.site-links a:hover {
  background: #fff;
  color: var(--ink);
}

.site-cta {
  display: flex;
  gap: 8px;
}

.site-cta .btn {
  text-decoration: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 48px;
  align-items: center;
  max-width: 1600px;
  margin: 0 auto;
  padding: 72px 32px 60px;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: 46px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -1.4px;
  color: var(--ink);
}

.hero-copy h1 em,
.auth-title em {
  font-style: normal;
  color: #3f9e3f;
  background: linear-gradient(transparent 62%, var(--lime) 62%);
}

.hero-copy > p {
  margin: 0 0 24px;
  max-width: 520px;
  font-size: 16px;
  line-height: 1.7;
  color: #4a4f59;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.hero-actions .btn {
  text-decoration: none;
}

.hero-phone {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone {
  width: 320px;
  padding: 18px 16px 22px;
  border-radius: 34px;
  background: #ece5dd;
  box-shadow: 0 30px 60px rgba(20, 22, 26, 0.16), 0 0 0 10px #17181c;
  display: flex;
  flex-direction: column;
  gap: 9px;
  direction: rtl;
  font-size: 12.5px;
}

.phone-top {
  direction: ltr;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px -4px 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #075e54;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
}

.phone-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lime);
}

.bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.6;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.bubble-in {
  align-self: flex-start;
  background: #fff;
  border-top-right-radius: 4px;
}

.bubble-out {
  align-self: flex-end;
  background: #dcf8c6;
  border-top-left-radius: 4px;
}

.bubble-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 88%;
}

.bubble-buttons span {
  padding: 9px;
  border-radius: 10px;
  background: #fff;
  color: #027eb5;
  text-align: center;
  font-weight: 500;
}

.hero-badge {
  position: absolute;
  right: 0;
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(20, 22, 26, 0.12);
  font-size: 12.5px;
}

.band {
  max-width: 1600px;
  margin: 0 auto;
  padding: 56px 32px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #3f9e3f;
}

.band h2,
.cta-band h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--ink);
}

.band-sub {
  margin: 0 0 28px;
  max-width: 620px;
  font-size: 15px;
  line-height: 1.7;
  color: #4a4f59;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.step-card {
  position: relative;
  padding: 26px 22px 22px;
  border-radius: 22px;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 14px;
}

.step-card h3,
.feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.step-card p,
.feature p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #4a4f59;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.feature {
  padding: 24px 22px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e6e8ec;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  font-size: 17px;
  margin-bottom: 14px;
}

.pricing-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: 34px 36px;
  border-radius: 26px;
  background: var(--ink);
  color: #fff;
}

.pricing-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
}

.pricing-card > div > p {
  margin: 0 0 18px;
  max-width: 560px;
  color: #c9ccd3;
  font-size: 14px;
  line-height: 1.7;
}

.pricing-card .checklist {
  color: #e7e9ee;
}

.pricing-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pricing-cta .btn-dark {
  background: var(--lime);
  color: var(--ink);
  text-decoration: none;
}

.pricing-cta small {
  color: #9da2ac;
  font-size: 12px;
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
  max-width: 760px;
}

.faq details {
  padding: 4px 22px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #e6e8ec;
}

.faq summary {
  padding: 14px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::after {
  content: '+';
  font-size: 18px;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: '−';
}

.faq p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #4a4f59;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: 1600px;
  margin: 20px auto 60px;
  padding: 40px 42px;
  border-radius: 28px;
  background: var(--teal);
  color: #fff;
}

.cta-band .eyebrow {
  color: #c9f24d;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.cta-band .hero-actions {
  margin: 0;
}

.cta-band .btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.site-footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 44px 32px 30px;
  border-top: 1px solid #e6e8ec;
  font-size: 13px;
  color: #555b66;
}

.site-footer .brand {
  padding: 0 0 10px;
  text-decoration: none;
  color: var(--ink);
}

.site-footer h4 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.site-footer a {
  display: block;
  margin-bottom: 7px;
  color: #555b66;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

.site-footer p {
  margin: 0;
  line-height: 1.6;
}

.site-copy {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid #e6e8ec;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- auth pages ---------- */

.auth-body {
  padding: 0;
  background: #fff;
}

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  min-height: 100vh;
}

.auth-side {
  display: flex;
  flex-direction: column;
  padding: 40px 48px;
  background: linear-gradient(160deg, #f4fbe7 0%, #ffffff 55%);
}

.auth-side .brand {
  padding: 0 0 14px;
  text-decoration: none;
  color: var(--ink);
  align-self: flex-start;
}

.auth-side .pill-tag {
  align-self: flex-start;
}

.auth-title {
  margin: 30px 0 14px;
  font-size: 40px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -1.2px;
  color: var(--ink);
}

.auth-lead {
  margin: 0 0 22px;
  max-width: 480px;
  font-size: 15px;
  line-height: 1.7;
  color: #4a4f59;
}

.mock {
  margin-top: 30px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e6e8ec;
  box-shadow: 0 20px 40px rgba(20, 22, 26, 0.08);
  overflow: hidden;
  font-size: 12px;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid #eef0f3;
  color: var(--muted);
  font-size: 11px;
}

.mock-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e6e8ec;
}

.mock-bar i:first-child { background: #ff5f57; }
.mock-bar i:nth-child(2) { background: #febc2e; }
.mock-bar i:nth-child(3) { background: #28c840; }

.mock-bar span {
  margin-left: 6px;
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.mock-stats div {
  padding: 12px;
  border-radius: 12px;
  background: #f7f8f9;
}

.mock-stats small {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.6px;
  color: var(--muted);
}

.mock-stats strong {
  display: block;
  margin: 4px 0 2px;
  font-size: 18px;
  color: var(--ink);
}

.mock-stats em {
  font-style: normal;
  color: var(--muted);
  font-size: 10.5px;
}

.mock-rows {
  padding: 0 14px 14px;
}

.mock-rows div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #eef0f3;
  color: #3f444d;
}

.auth-foot {
  margin-top: auto;
  padding-top: 26px;
  color: var(--muted);
  font-size: 12px;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 40px 32px;
  background: #f5f6f8;
}

.auth-card {
  width: min(440px, 100%);
  padding: 34px 32px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(20, 22, 26, 0.08);
}

.auth-card h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.6px;
  text-align: center;
  color: var(--ink);
}

.auth-sub {
  margin: 0 0 6px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.auth-card .btn-dark {
  width: 100%;
  padding: 13px;
  font-size: 14px;
  border-radius: 13px;
}

.auth-switch {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: #555b66;
}

.auth-switch a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

.auth-legal {
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-legal a {
  color: #555b66;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero,
  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-top: 44px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .steps-grid,
  .feature-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pricing-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-links {
    display: none;
  }

  .auth-side {
    padding: 28px 22px;
  }

  .mock {
    display: none;
  }
}

@media (max-width: 620px) {
  .site-nav {
    padding: 12px 16px;
  }

  .hero,
  .band {
    padding-left: 16px;
    padding-right: 16px;
  }

  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone {
    width: 100%;
    max-width: 320px;
  }

  .cta-band {
    padding: 30px 22px;
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* ---------- template editor ---------- */

.topbar-back {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tpl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.tpl-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 4px;
}

.seg button {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #5c626d;
  cursor: pointer;
}

.seg button.is-on {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  font-weight: 600;
}

.tpl-button {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}

.tpl-button .chip {
  flex-shrink: 0;
}

.tpl-button input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
}

.add-button {
  position: relative;
  display: inline-block;
}

.add-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 5;
  min-width: 250px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(20, 22, 26, 0.14);
}

.add-menu-group {
  margin: 8px 8px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.add-menu button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 11px;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.add-menu button small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}

.add-menu button:hover {
  background: #f5f6f8;
}

.form-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .tpl-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .tpl-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
