:root {
  --bg: #0b0f14;
  --bg-soft: #111821;
  --panel: #161f2a;
  --panel-strong: #1d2835;
  --text: #f5f8fc;
  --muted: #a8b3c1;
  --line: rgba(255, 255, 255, 0.11);
  --accent: #35d0a5;
  --accent-strong: #73e2c7;
  --accent-warm: #f2b25d;
  --danger: #ff7e7e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(53, 208, 165, 0.16), transparent 26%),
    linear-gradient(310deg, rgba(242, 178, 93, 0.13), transparent 28%),
    linear-gradient(180deg, #101721 0%, var(--bg) 52%, #080b10 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

main {
  padding: 0 24px 56px;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 360ms ease, transform 360ms ease;
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

.topbar,
.hero,
.metric-strip,
.section,
.flash-stack,
.footer,
.auth-shell,
.editor-shell {
  width: min(1160px, 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.bot-actions,
.dashboard-title-row,
.bot-card-head {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 850;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-warm));
  color: #07100d;
  box-shadow: 0 14px 34px rgba(53, 208, 165, 0.22);
}

.site-nav {
  gap: 18px;
  color: var(--muted);
  font-weight: 700;
}

.site-nav a:hover,
.nav-user {
  color: var(--text);
}

.nav-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-weight: 850;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-warm));
  color: #07100d;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.055);
}

.button.danger {
  border-color: rgba(255, 126, 126, 0.45);
  background: rgba(255, 126, 126, 0.1);
}

.hero {
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.86fr);
  align-items: center;
  gap: 48px;
  padding: 42px 0 28px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.panel-header span,
.status-grid span,
.command-card span,
.plan-label {
  margin: 0;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  max-width: 11ch;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.6rem, 3vw, 3rem);
  line-height: 1.05;
}

h3 {
  margin-bottom: 10px;
}

.hero-lede,
.section-heading p,
.capability-card p,
.plan-card p,
.footer span,
.command-card p,
.bot-card p,
.empty-state p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-lede {
  max-width: 64ch;
  font-size: 1.06rem;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.ops-panel,
.auth-card,
.dashboard-create,
.bot-card,
.empty-state,
.checkout-panel,
.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: var(--shadow);
}

.ops-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.panel-header {
  min-height: 150px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(53, 208, 165, 0.18), transparent 48%),
    linear-gradient(320deg, rgba(242, 178, 93, 0.16), transparent 42%),
    #111824;
}

.panel-header strong {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.status-grid,
.auth-grid,
.dashboard-summary,
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-grid div,
.command-card,
.capability-card,
.plan-card,
.dashboard-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.status-grid div {
  display: grid;
  gap: 7px;
  padding: 16px;
}

.status-grid strong {
  font-size: 1.2rem;
}

.command-card {
  padding: 18px;
}

.command-card p {
  margin: 8px 0 0;
}

.metric-strip,
.capability-grid,
.pricing-grid,
.bot-manage-grid,
.create-grid {
  display: grid;
  gap: 18px;
}

.metric-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: -6px;
}

.metric-strip div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.metric-strip strong,
.dashboard-summary strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.9rem;
  color: var(--accent-warm);
}

.metric-strip span,
.dashboard-summary span {
  color: var(--muted);
  line-height: 1.45;
}

.section,
.auth-shell {
  padding: 66px 0 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

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

.capability-card {
  display: grid;
  align-content: start;
  min-height: 280px;
  padding: 24px;
}

.capability-card > span {
  color: var(--accent-warm);
  font-size: 2.3rem;
  font-weight: 900;
}

.capability-card small {
  color: var(--muted);
  margin: 5px 0 28px;
}

.plan-card {
  display: grid;
  gap: 20px;
  padding: 24px;
  background: var(--panel);
}

.plan-card.featured {
  border-color: rgba(53, 208, 165, 0.5);
  background:
    linear-gradient(180deg, rgba(53, 208, 165, 0.12), rgba(255, 255, 255, 0.04)),
    var(--panel);
}

.plan-card h3 {
  margin: 14px 0 12px;
  font-size: 1.8rem;
}

.price-line {
  display: block;
  color: var(--accent-warm);
  font-size: 1.25rem;
}

.plan-card ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.plan-card li {
  color: var(--muted);
}

.plan-card li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--accent);
}

.compact-form,
.auth-form,
.bot-form,
.create-grid,
.checkout-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0c1119;
  color: var(--text);
}

textarea {
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(53, 208, 165, 0.32);
  outline-offset: 1px;
}

.auth-shell h1,
.dashboard-section h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.auth-card,
.dashboard-create,
.bot-card,
.empty-state,
.checkout-panel,
.order-card {
  padding: 24px;
}

.dashboard-title-row,
.bot-card-head {
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.dashboard-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dashboard-summary div {
  padding: 18px;
}

.dashboard-create {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.orders-grid,
.checkout-grid,
.payment-grid {
  display: grid;
  gap: 18px;
}

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

.order-card {
  display: grid;
  gap: 10px;
}

.checkout-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.checkout-summary ul {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.checkout-summary li {
  color: var(--muted);
}

.checkout-summary li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 2px;
  background: var(--accent);
}

.checkout-meta {
  margin-top: 18px;
}

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

.payment-tile {
  grid-template-columns: auto 1fr;
  align-items: start;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.payment-tile input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.payment-copy {
  display: grid;
  gap: 4px;
}

.payment-copy strong {
  color: var(--text);
}

.payment-copy small,
.checkout-note {
  color: var(--muted);
  line-height: 1.5;
}

.checkout-actions {
  display: grid;
  gap: 10px;
 }

.create-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.bot-manage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bot-card {
  display: grid;
  gap: 18px;
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(168, 179, 193, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 850;
}

.status-running {
  border-color: rgba(53, 208, 165, 0.5);
  color: var(--accent-strong);
}

.status-maintenance {
  border-color: rgba(242, 178, 93, 0.5);
  color: var(--accent-warm);
}

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

.check-tile {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.check-tile input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.bot-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.editor-shell {
  width: min(1480px, 100%);
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  padding: 28px 0 0;
}

.editor-sidebar,
.editor-main,
.editor-palette,
.editor-canvas,
.flow-block,
.flow-start,
.flow-settings,
.flow-list-item,
.palette-button,
.flow-json-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.editor-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  align-content: start;
  gap: 16px;
  max-height: calc(100vh - 112px);
  padding: 16px;
  overflow: auto;
}

.editor-sidebar h1 {
  max-width: 100%;
  font-size: 2.2rem;
  line-height: 1;
}

.flow-list {
  display: grid;
  gap: 10px;
}

.flow-list-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  color: var(--muted);
}

.flow-list-item strong {
  color: var(--text);
}

.flow-list-item.is-active {
  border-color: rgba(53, 208, 165, 0.52);
  background: rgba(53, 208, 165, 0.1);
}

.editor-main {
  min-width: 0;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    var(--panel);
  box-shadow: var(--shadow);
}

.editor-toolbar,
.editor-actions,
.flow-block-head,
.block-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-toolbar,
.flow-block-head {
  justify-content: space-between;
}

.editor-toolbar {
  margin-bottom: 16px;
}

.editor-toolbar h2 {
  margin-bottom: 0;
}

.editor-actions,
.block-tools {
  flex-wrap: wrap;
}

.toggle-label {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.toggle-label input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--accent);
}

.toggle-label-compact {
  min-width: fit-content;
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: start;
}

.top-palette {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.palette-search {
  min-width: 0;
}

.palette-search input {
  min-height: 40px;
  padding-inline: 14px;
  border-color: rgba(53, 208, 165, 0.16);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02)),
    #0d131c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.palette-search input::placeholder {
  color: rgba(168, 179, 193, 0.72);
}

.top-palette .palette-group {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 226, 199, 0.4) transparent;
}

.top-palette .palette-group::-webkit-scrollbar,
.flow-json-preview pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.top-palette .palette-group::-webkit-scrollbar-track,
.flow-json-preview pre::-webkit-scrollbar-track {
  background: transparent;
}

.top-palette .palette-group::-webkit-scrollbar-thumb,
.flow-json-preview pre::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(115, 226, 199, 0.36);
  background-clip: padding-box;
}

.top-palette .palette-button {
  flex: 0 0 auto;
  width: auto;
  min-height: 42px;
  padding: 0 14px;
  align-content: center;
  white-space: nowrap;
}

.flowchart-workbench {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 280px;
  gap: 16px;
  align-items: stretch;
}

.flowchart-canvas-wrap {
  min-width: 0;
  min-height: 680px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.025);
  background-size: 36px 36px;
  overflow: hidden;
  cursor: grab;
}

.flowchart-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.flowchart-world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.flowchart-canvas.is-panning {
  cursor: grabbing;
}

.flowchart-links,
.flowchart-nodes {
  position: absolute;
  inset: 0;
}

.flowchart-links {
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.flow-link {
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 3;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(53, 208, 165, 0.22));
  pointer-events: stroke;
  cursor: pointer;
}

.flow-link:hover {
  stroke: var(--accent-warm);
}

.flow-link-draft {
  stroke: rgba(242, 178, 93, 0.88);
  stroke-dasharray: 8 8;
}

.flow-node {
  position: absolute;
  width: 230px;
  min-height: 88px;
  display: grid;
  grid-template-columns: 16px 1fr 16px;
  align-items: center;
  gap: 10px;
  padding: 12px 48px 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #111822;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  cursor: grab;
  user-select: none;
}

.flow-node:active {
  cursor: grabbing;
}

.flow-node.is-selected {
  border-color: rgba(53, 208, 165, 0.75);
  box-shadow: 0 0 0 2px rgba(53, 208, 165, 0.16), 0 18px 44px rgba(0, 0, 0, 0.28);
}

.flow-node.is-linking {
  border-color: rgba(242, 178, 93, 0.75);
}

.flow-node.is-locked {
  cursor: default;
}

.flow-node-condition {
  background: linear-gradient(145deg, rgba(242, 178, 93, 0.12), rgba(255, 255, 255, 0.045)), #111822;
}

.flow-node-action {
  background: linear-gradient(145deg, rgba(53, 208, 165, 0.12), rgba(255, 255, 255, 0.045)), #111822;
}

.flow-node-trigger {
  background: linear-gradient(145deg, rgba(168, 179, 193, 0.16), rgba(255, 255, 255, 0.045)), #111822;
}

.node-body {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.node-body span {
  color: var(--accent-warm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 850;
}

.node-body strong,
.node-body small {
  text-overflow: ellipsis;
}

.node-body strong {
  overflow: visible;
  white-space: normal;
  line-height: 1.2;
}

.node-body small {
  overflow: hidden;
  white-space: nowrap;
}

.node-body small {
  color: var(--muted);
}

.node-port {
  width: 16px;
  height: 16px;
  min-height: 16px;
  padding: 0;
  border: 2px solid var(--accent-strong);
  border-radius: 50%;
  background: #07100d;
  cursor: crosshair;
}

.node-port-in {
  border-color: var(--accent-warm);
}

.node-ports-out {
  position: absolute;
  top: 50%;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateY(-50%);
}

.node-port-row {
  display: grid;
  grid-template-columns: 26px 16px;
  align-items: center;
  gap: 6px;
}

.node-port-label {
  color: var(--accent-warm);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(7, 16, 13, 0.88);
  opacity: 0.95;
  min-width: 26px;
}

.node-port-row .node-port {
  order: 1;
}

.node-port-label.is-empty {
  display: none;
}

.flow-node-logic {
  background: linear-gradient(145deg, rgba(129, 158, 255, 0.14), rgba(255, 255, 255, 0.045)), #111822;
}

.hide-branch-labels .node-port-label {
  display: none;
}

.node-inspector {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.variable-editor,
.variable-item {
  display: grid;
  gap: 10px;
}

.variable-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.variable-list {
  display: grid;
  gap: 10px;
}

.variable-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

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

.inspector-fields {
  display: grid;
  gap: 12px;
}

.inspector-fields input[type="search"],
.inspector-fields input[type="text"],
.inspector-fields textarea,
.inspector-fields select {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02)),
    #0c1119;
}

.inspector-title {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.08);
}

.inspector-title span {
  color: var(--muted);
  text-transform: capitalize;
}

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

.editor-canvas,
.editor-palette {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.editor-main.is-fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 80;
  overflow: auto;
}

.editor-main:fullscreen,
body.editor-fullscreen .editor-main {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 16px;
  border-radius: 0;
  z-index: 120;
}

.editor-main.is-fullscreen .flowchart-canvas-wrap {
  min-height: calc(100vh - 270px);
}

.editor-main:fullscreen .flowchart-canvas-wrap,
body.editor-fullscreen .editor-main .flowchart-canvas-wrap {
  min-height: calc(100vh - 250px);
}

.editor-main:fullscreen .flowchart-workbench,
body.editor-fullscreen .editor-main .flowchart-workbench {
  grid-template-columns: minmax(760px, 1fr) 320px;
}

.editor-context-menu {
  position: fixed;
  z-index: 100;
  display: none;
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111822;
  box-shadow: var(--shadow);
}

.editor-context-menu.is-open {
  display: grid;
  gap: 4px;
}

.editor-context-menu button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.editor-context-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.flow-settings {
  padding: 14px;
  background: rgba(0, 0, 0, 0.08);
}

.flow-start {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 14px;
  border-color: rgba(242, 178, 93, 0.42);
}

.flow-start span,
.flow-kind {
  color: var(--accent-warm);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 850;
}

.flow-block-stack {
  display: grid;
  gap: 14px;
}

.flow-block {
  display: grid;
  gap: 14px;
  padding: 14px;
  position: relative;
}

.flow-block::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 2px;
  height: 14px;
  background: var(--line);
}

.flow-block h3 {
  margin: 4px 0 0;
}

.flow-block-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.editor-check {
  margin-top: 0;
}

.palette-group {
  display: grid;
  gap: 10px;
}

.palette-button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.palette-button span {
  color: var(--muted);
  text-transform: capitalize;
}

.flow-json-preview {
  min-width: 0;
  padding: 12px;
}

.flow-json-preview pre {
  max-height: 300px;
  overflow: auto;
  margin: 10px 0 0;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  scrollbar-width: thin;
  scrollbar-color: rgba(115, 226, 199, 0.4) transparent;
}

.empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.flash-stack {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.flash {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.flash-success {
  border-color: rgba(53, 208, 165, 0.45);
}

.flash-error {
  border-color: rgba(255, 126, 126, 0.5);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 42px 24px 54px;
  color: var(--muted);
}

.footer div {
  display: grid;
  gap: 7px;
}

.footer strong,
.footer a {
  color: var(--text);
}

@media (max-width: 980px) {
  .capability-grid,
  .pricing-grid,
  .bot-manage-grid,
  .create-grid,
  .orders-grid,
  .checkout-grid,
  .payment-grid,
  .editor-shell,
  .editor-grid,
  .flowchart-workbench {
    grid-template-columns: 1fr;
  }

  .editor-sidebar {
    position: static;
    max-height: none;
  }
}

@media (max-width: 860px) {
  main {
    padding-inline: 16px;
  }

  .topbar {
    padding-inline: 16px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(12, 17, 25, 0.96);
  }

  .topbar.is-open .site-nav {
    display: grid;
  }

  .site-nav form,
  .nav-button {
    width: 100%;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 48px;
  }

  .metric-strip,
  .dashboard-summary,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-title-row,
  .bot-card-head {
    display: grid;
  }
}

@media (max-width: 560px) {
  .hero-actions,
  .footer,
  .bot-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .status-grid,
  .form-row,
  .module-checks,
  .flow-block-fields {
    grid-template-columns: 1fr;
  }
}
