body.mpay-ref-editor-active {
  --ref-bg: #03070d;
  --ref-panel: #091321;
  --ref-panel-soft: #0c1828;
  --ref-field: #0d1a2a;
  --ref-border: rgba(137, 174, 216, 0.14);
  --ref-border-strong: rgba(63, 146, 255, 0.5);
  --ref-blue: #328df8;
  --ref-blue-hover: #55a3ff;
  --ref-blue-soft: rgba(50, 141, 248, 0.13);
  --ref-text: #f4f7fb;
  --ref-muted: #7f8da0;
  background: var(--ref-bg) !important;
}

body.mpay-ref-editor-active #root > .dashboard-shell {
  display: block !important;
  min-height: 100vh;
  background: radial-gradient(circle at 52% -8%, rgba(30, 104, 190, 0.13), transparent 34%), var(--ref-bg) !important;
}

body.mpay-ref-editor-active #root > .dashboard-shell > aside,
body.mpay-ref-editor-active #root > .dashboard-shell > .app-sidebar { display: none !important; }

.mpay-ref-icon { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.mpay-ref-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

body.mpay-ref-editor-active .mpay-ref-main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 20px 32px !important;
  overflow: visible !important;
}

body.mpay-ref-editor-active .mpay-ref-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

body.mpay-ref-editor-active .mpay-ref-content > * + * { margin-top: 0 !important; }

.mpay-ref-header {
  position: sticky;
  top: 0;
  z-index: 45;
  height: 66px;
  margin: 0 -20px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(130, 165, 205, 0.08);
  background: rgba(3, 7, 13, 0.95);
  backdrop-filter: blur(16px);
}

.mpay-ref-header-main,
.mpay-ref-header-actions { min-width: 0; display: flex; align-items: center; gap: 12px; }

.mpay-ref-back,
.mpay-ref-save,
.mpay-ref-help,
.mpay-ref-title-block button {
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
}

.mpay-ref-back,
.mpay-ref-save {
  height: 35px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 12px;
}

.mpay-ref-back {
  border: 1px solid var(--ref-border);
  color: #b4c0cf;
  background: rgba(255,255,255,0.025);
}
.mpay-ref-back:hover { color: #fff; border-color: var(--ref-border-strong); }

.mpay-ref-title-block { width: 116px; min-width: 116px; line-height: 1; }
.mpay-ref-title-block > div { display: flex; align-items: center; gap: 6px; }
.mpay-ref-title-block strong { color: var(--ref-text); font-size: 15px; font-weight: 750; white-space: nowrap; }
.mpay-ref-title-block > span { display: block; margin-top: 6px; color: #75849a; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.mpay-ref-title-block button,
.mpay-ref-help { width: 28px; height: 28px; padding: 6px; display: inline-flex; border: 0; color: #75849a; background: transparent; }
.mpay-ref-title-block button .mpay-ref-icon { width: 13px; height: 13px; }

.mpay-ref-locale {
  width: 153px;
  height: 36px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--ref-border);
  border-radius: 12px;
  background: rgba(255,255,255,0.018);
}
.mpay-ref-locale > span { height: 30px; padding: 0 11px; display: inline-flex; align-items: center; gap: 5px; border-radius: 9px; color: #67768a; font-size: 12px; white-space: nowrap; }
.mpay-ref-locale > .is-active { color: #b9d9ff; background: var(--ref-blue-soft); }
.mpay-ref-locale .mpay-ref-icon { width: 10px; height: 10px; }

.mpay-ref-save-state { display: inline-flex; align-items: center; gap: 7px; color: #8795a7; font-size: 12px; white-space: nowrap; }
.mpay-ref-save-state i { width: 6px; height: 6px; border-radius: 50%; background: #36c88e; }
.mpay-ref-save-state.is-dirty { color: #f2bc31; }
.mpay-ref-save-state.is-dirty i { background: #f2bc31; }
.mpay-ref-save { border: 1px solid #4c9cff; color: #fff; background: var(--ref-blue); font-size: 12.5px; font-weight: 720; box-shadow: 0 8px 22px rgba(27,107,224,.18); }
.mpay-ref-save:hover { background: var(--ref-blue-hover); }
.mpay-ref-save:disabled { opacity: .58; cursor: wait; }

.mpay-save-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #f7fbff;
  background: rgba(1, 6, 13, .62);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}

.mpay-save-loader.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mpay-save-loader-content {
  min-width: min(92vw, 330px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.mpay-save-loader-letters {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7fbff;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.4;
}

.mpay-save-loader-letters span {
  display: inline-block;
  animation: mpay-save-letter 1.1s ease-in-out infinite;
  animation-delay: var(--mpay-letter-delay, 0s);
}

.mpay-save-loader-orbit {
  position: relative;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(85, 163, 255, .18);
  border-top-color: #55a3ff;
  border-right-color: #328df8;
  border-radius: 50%;
  filter: drop-shadow(0 0 12px rgba(50, 141, 248, .35));
  animation: mpay-save-spin .82s linear infinite;
}

.mpay-save-loader-orbit span {
  position: absolute;
  top: 4px;
  right: 2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #79baff;
  box-shadow: 0 0 14px rgba(85, 163, 255, .9);
}

.mpay-save-loader-orbit i {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8bc4ff, #328df8 52%, #0d4f9c);
  box-shadow: inset 0 0 7px rgba(255,255,255,.35), 0 0 16px rgba(50,141,248,.42);
}

.mpay-save-loader-result {
  display: none;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border: 2px solid #55a3ff;
  border-radius: 50%;
  color: #fff;
  background: rgba(50, 141, 248, .16);
  box-shadow: 0 0 22px rgba(50,141,248,.3);
  font-size: 25px;
  font-style: normal;
}

.mpay-save-loader[data-state="success"] .mpay-save-loader-orbit,
.mpay-save-loader[data-state="error"] .mpay-save-loader-orbit { display: none; }
.mpay-save-loader[data-state="success"] .mpay-save-loader-result,
.mpay-save-loader[data-state="error"] .mpay-save-loader-result { display: flex; }
.mpay-save-loader[data-state="success"] .mpay-save-loader-result::before { content: "\2713"; }
.mpay-save-loader[data-state="error"] .mpay-save-loader-result::before { content: "!"; }
.mpay-save-loader[data-state="error"] .mpay-save-loader-result {
  border-color: #f0b84a;
  color: #ffd98a;
  background: rgba(240,184,74,.12);
  box-shadow: 0 0 22px rgba(240,184,74,.2);
}

@keyframes mpay-save-spin { to { transform: rotate(360deg); } }
@keyframes mpay-save-letter {
  0%, 65%, 100% { transform: translateY(0); color: #dbeeff; opacity: .7; }
  30% { transform: translateY(-5px); color: #79baff; opacity: 1; text-shadow: 0 0 12px rgba(85,163,255,.65); }
}

@media (prefers-reduced-motion: reduce) {
  .mpay-save-loader-letters span,
  .mpay-save-loader-orbit { animation-duration: 1.8s; }
}

body.mpay-ref-editor-active .mpay-ref-stage {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

body.mpay-ref-editor-active [data-mpay-ref-native-title],
body.mpay-ref-editor-active [data-mpay-ref-native-nav],
body.mpay-ref-editor-active [data-mpay-flow-save-row],
body.mpay-ref-editor-active [data-mpay-flow-extra]:not([data-mpay-ref-payment-source]),
body.mpay-ref-editor-active [data-mpay-upsell-base],
body.mpay-ref-editor-active [data-mpay-downsell-base] { display: none !important; }

.mpay-ref-nav {
  position: sticky;
  top: 66px;
  grid-column: 1;
  min-width: 0;
  min-height: calc(100vh - 66px);
  padding: 12px;
  border: 1px solid var(--ref-border);
  border-radius: 16px;
  background: rgba(7, 14, 24, .9);
}
.mpay-ref-nav-head { min-height: 48px; position: relative; display: flex; flex-direction: column; gap: 4px; color: #8291a4; }
.mpay-ref-nav-head > span,
.mpay-ref-nav-group > span { font-size: 9px; font-weight: 800; letter-spacing: .11em; }
.mpay-ref-nav-head small { color: #aab5c3; font-size: 10px; }
.mpay-ref-nav-head > .mpay-ref-icon { position: absolute; top: 3px; right: 0; width: 15px; height: 15px; }
.mpay-ref-nav-group { margin-top: 7px; }
.mpay-ref-nav-group > span { display: block; margin: 0 10px 7px; color: #69788d; }
.mpay-ref-nav button {
  width: 100%;
  height: 35px;
  margin: 1px 0;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  color: #8391a4;
  background: transparent;
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.mpay-ref-nav button:hover { color: #d7e6f7; background: rgba(255,255,255,.025); }
.mpay-ref-nav button.is-active { color: #eff7ff; background: rgba(44,126,231,.14); }
.mpay-ref-nav button.is-active .mpay-ref-icon { color: #54a4ff; }

body.mpay-ref-editor-active :is(.mpay-flow-bots-panel,.mpay-welcome-editor,.mpay-plans-editor,[data-mpay-upsell-tools],[data-mpay-downsell-tools],[data-mpay-ref-payments]) {
  grid-column: 2;
  grid-row: 1;
  width: calc(100% - 4px) !important;
  min-width: 0;
  display: none !important;
}
body.mpay-ref-editor-active[data-mpay-ref-active="Bots"] .mpay-flow-bots-panel,
body.mpay-ref-editor-active[data-mpay-ref-active="Boas vindas"] .mpay-welcome-editor,
body.mpay-ref-editor-active[data-mpay-ref-active="Planos"] .mpay-plans-editor,
body.mpay-ref-editor-active[data-mpay-ref-active="Upsell"] [data-mpay-upsell-tools]:not([data-mpay-downsell-tools]),
body.mpay-ref-editor-active[data-mpay-ref-active="Downsell"] [data-mpay-downsell-tools],
body.mpay-ref-editor-active[data-mpay-ref-active="Pagamentos"] [data-mpay-ref-payments] { display: grid !important; }

body.mpay-ref-editor-active :is(.mpay-flow-summary,.mpay-linked-bots,.mpay-cache-card,[data-mpay-welcome-part],[data-mpay-plans-part],.mpay-upsell-card,.mpay-downsell-card,.mpay-ref-conversion-aside,.mpay-ref-plans-side > *) {
  border: 1px solid var(--ref-border) !important;
  border-radius: 16px !important;
  background: rgba(9, 19, 33, .82) !important;
  box-shadow: none !important;
}

body.mpay-ref-editor-active :is(input,textarea,select) {
  border-color: var(--ref-border) !important;
  border-radius: 12px !important;
  color: var(--ref-text) !important;
  background: var(--ref-field) !important;
}
body.mpay-ref-editor-active :is(input,select) { min-height: 42px; }
body.mpay-ref-editor-active :is(input,textarea,select):focus { border-color: var(--ref-border-strong) !important; outline: none !important; box-shadow: 0 0 0 2px rgba(50,141,248,.09) !important; }

/* Bots: 662px main + 340px support at the measured desktop viewport. */
body.mpay-ref-editor-active .mpay-flow-bots-panel {
  grid-template-columns: minmax(0, 1fr) 340px !important;
  gap: 16px !important;
  align-items: start;
}
body.mpay-ref-editor-active .mpay-flow-summary { grid-column: 1; min-height: 183px; padding: 20px !important; }
body.mpay-ref-editor-active .mpay-linked-bots { grid-column: 1; min-height: 302px; padding: 20px !important; }
body.mpay-ref-editor-active .mpay-cache-card { grid-column: 2; grid-row: 1 / span 2; padding: 16px !important; }
body.mpay-ref-editor-active .mpay-flow-summary > div,
body.mpay-ref-editor-active .mpay-flow-stats { gap: 12px !important; }
body.mpay-ref-editor-active .mpay-flow-stat { min-height: 83px; padding: 16px !important; border-radius: 12px !important; background: rgba(255,255,255,.025) !important; }

/* Welcome: the media/message column and the auxiliary column match the reference. */
body.mpay-ref-editor-active .mpay-welcome-editor {
  grid-template-columns: minmax(0, 1fr) 340px !important;
  gap: 16px !important;
  align-items: start;
}
body.mpay-ref-editor-active [data-mpay-welcome-part="Midias"] { grid-column: 1; min-height: 257px; padding: 20px !important; }
body.mpay-ref-editor-active [data-mpay-welcome-part="Mensagem Inicial"] { grid-column: 1; min-height: 310px; padding: 20px !important; }
body.mpay-ref-editor-active [data-mpay-welcome-part="Audio"] { grid-column: 2; grid-row: 1 / span 2; padding: 16px !important; }
body.mpay-ref-editor-active [data-mpay-welcome-part="Mensagem Inicial"] textarea { min-height: 149px !important; }

/* Plans: new measured header and full-width functional plan list. */
body.mpay-ref-editor-active .mpay-plans-editor {
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start;
}
body.mpay-ref-editor-active [data-mpay-plans-part] { grid-column: 1; width: 100% !important; margin: 0 !important; }
body.mpay-ref-editor-active [data-mpay-plans-part="Planos"] { min-width: 0; min-height: 363px; padding: 20px !important; }
body.mpay-ref-editor-active [data-mpay-plans-part="CTA"],
body.mpay-ref-editor-active [data-mpay-plans-part="Contagem Regressiva"] { padding: 16px !important; }
body.mpay-ref-editor-active .mpay-flow-plan-editor { width: 100% !important; min-width: 0; }
body.mpay-ref-editor-active [data-mpay-ref-legacy-header] { display: none !important; }
.mpay-ref-plans-header {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: start;
  gap: 12px;
}
.mpay-ref-section-heading { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.mpay-ref-section-heading > .mpay-ref-icon { width: 36px; height: 36px; padding: 9px; border: 1px solid rgba(60,145,255,.3); border-radius: 11px; color: #57a5ff; background: rgba(45,126,228,.1); }
.mpay-ref-section-heading > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mpay-ref-section-heading strong { color: var(--ref-text); font-size: 15px; line-height: 1.25; font-weight: 750; }
.mpay-ref-section-heading span { color: var(--ref-muted); font-size: 11px; line-height: 1.35; }
.mpay-ref-counter { padding-top: 4px; color: #91a0b2; font-size: 11px; white-space: nowrap; }
.mpay-ref-primary-action { height: 35px !important; min-height: 35px !important; padding: 0 16px !important; display: inline-flex !important; align-items: center; justify-content: center; gap: 7px; border-radius: 12px !important; border: 1px solid #4b9cff !important; color: #fff !important; background: var(--ref-blue) !important; font-size: 12px !important; font-weight: 700 !important; white-space: nowrap; }
.mpay-ref-primary-action .mpay-ref-icon { width: 14px; height: 14px; }
body.mpay-ref-editor-active .mpay-flow-plan-list { width: 100%; display: grid !important; gap: 12px !important; }
body.mpay-ref-editor-active .mpay-flow-plan-list:empty {
  min-height: 184px;
  border: 1px dashed rgba(141,173,211,.18);
  border-radius: 16px;
  background: rgba(255,255,255,.012);
}
body.mpay-ref-editor-active .mpay-flow-plan-empty,
body.mpay-ref-editor-active .mpay-flow-plan-skeleton {
  min-height: 184px !important;
  padding: 40px 24px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(141,173,211,.18) !important;
  border-radius: 16px !important;
  color: var(--ref-muted) !important;
  background: rgba(255,255,255,.012) !important;
  text-align: center;
  font-size: 12px;
}
body.mpay-ref-editor-active .mpay-flow-plan-card { width: 100%; border: 1px solid var(--ref-border) !important; border-radius: 16px !important; background: rgba(255,255,255,.018) !important; box-shadow: none !important; overflow: hidden; }
body.mpay-ref-editor-active .mpay-flow-plan-card > * { max-width: none !important; }
/* Upsell / Downsell: exact measured 330px settings panel and fluid sequence area. */
body.mpay-ref-editor-active [data-mpay-upsell-tools],
body.mpay-ref-editor-active [data-mpay-downsell-tools] {
  grid-template-columns: 330px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: start;
}
.mpay-ref-conversion-aside { grid-column: 1; grid-row: 1; min-height: 389px; padding: 20px; }
.mpay-ref-conversion-title { display: flex; align-items: center; gap: 9px; color: var(--ref-text); font-size: 15px; }
.mpay-ref-conversion-title .mpay-ref-icon { color: #58a5ff; }
.mpay-ref-conversion-aside > p { margin: 9px 0 18px; color: var(--ref-muted); font-size: 11px; line-height: 1.5; }
.mpay-ref-conversion-aside > :is(.mpay-upsell-master-toggle,.mpay-downsell-master-toggle) { margin: 0 0 16px !important; padding: 0 0 16px !important; border-bottom: 1px solid var(--ref-border) !important; border-radius: 0 !important; background: transparent !important; }
.mpay-ref-how { padding: 14px; border: 1px solid rgba(68,148,245,.22); border-radius: 12px; background: rgba(46,126,224,.07); }
.mpay-ref-how strong { color: #65acff; font-size: 12px; }
.mpay-ref-how p { margin: 8px 0 0; color: #b3c0cf; font-size: 11px; line-height: 1.6; }
.mpay-ref-conversion-main { grid-column: 2; grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mpay-ref-conversion-main > header { height: 28px; display: flex; align-items: flex-start; justify-content: space-between; color: var(--ref-text); }
.mpay-ref-conversion-main > header strong { font-size: 15px; font-weight: 750; }
.mpay-ref-conversion-main > header span { color: #91a0b2; font-size: 11px; }
.mpay-ref-conversion-main > :not(header) { width: 100% !important; min-width: 0; }
.mpay-ref-conversion-main > :is(.mpay-upsell-empty,.mpay-downsell-empty),
.mpay-ref-conversion-main > div:only-of-type {
  min-height: 148px;
  padding: 40px 24px !important;
  border: 1px dashed rgba(141,173,211,.18) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.012) !important;
}
body.mpay-ref-editor-active :is(.mpay-upsell-card,.mpay-downsell-card) { padding: 20px !important; }

/* Payments: 667px working area + 320px Telegram preview, measured from the reference. */
.mpay-ref-payments {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
  width: calc(100% - 19px) !important;
}
.mpay-ref-payment-main { min-width: 0; }
.mpay-ref-payment-tabs { height: 37px; display: flex; gap: 8px; margin-bottom: 16px; }
.mpay-ref-payment-tabs button {
  height: 37px;
  padding: 8px 16px;
  border: 1px solid var(--ref-border);
  border-radius: 12px;
  color: #8391a4;
  background: rgba(255,255,255,.018);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.mpay-ref-payment-tabs button.is-active { color: #a9d2ff; border-color: rgba(65,147,248,.48); background: rgba(47,129,230,.12); }
.mpay-ref-payment-panel[hidden] { display: none !important; }
.mpay-ref-payment-message-card,
.mpay-ref-approved-card,
.mpay-ref-payment-preview {
  border: 1px solid var(--ref-border);
  border-radius: 16px;
  background: rgba(9,19,33,.82);
}
.mpay-ref-payment-message-card,
.mpay-ref-approved-card { min-height: 364px; padding: 20px; }
.mpay-ref-payment-card-title { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; }
.mpay-ref-payment-card-title > .mpay-ref-icon { width: 16px; height: 16px; margin-top: 2px; color: #58a5ff; }
.mpay-ref-payment-card-title > div { display: flex; flex-direction: column; gap: 5px; }
.mpay-ref-payment-card-title strong { color: var(--ref-text); font-size: 14px; font-weight: 750; }
.mpay-ref-payment-card-title span { color: var(--ref-muted); font-size: 11px; }
body.mpay-ref-editor-active [data-mpay-ref-payment-source] {
  display: block !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.mpay-ref-editor-active [data-mpay-ref-payment-source] > :is(h1,h2,h3,p) { display: none !important; }
body.mpay-ref-editor-active [data-mpay-ref-payment-source] textarea { width: 100% !important; min-height: 170px !important; padding: 10px 12px !important; font-size: 13px !important; line-height: 1.62 !important; }
.mpay-ref-payment-preview { position: sticky; top: 82px; min-height: 255px; padding: 0 12px 12px; overflow: hidden; }
.mpay-ref-preview-title { height: 43px; margin: 0 -12px 12px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--ref-border); color: #dce8f5; }
.mpay-ref-preview-title strong { font-size: 12px; }
.mpay-ref-preview-user { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.mpay-ref-preview-user > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--ref-blue); font-size: 12px; font-weight: 750; }
.mpay-ref-preview-user > div { display: flex; flex-direction: column; }
.mpay-ref-preview-user strong { color: #eaf2fb; font-size: 11px; }
.mpay-ref-preview-user small { color: #8290a2; font-size: 9px; }
.mpay-ref-preview-bubble { min-height: 74px; padding: 10px; border-radius: 12px; color: #cdd8e5; background: rgba(255,255,255,.045); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; line-height: 1.55; }
.mpay-ref-preview-compose { height: 34px; margin-top: 10px; padding: 0 10px; display: flex; align-items: center; border-radius: 11px; color: #667589; background: rgba(255,255,255,.035); font-size: 10px; }
.mpay-ref-approved-summary { display: grid; gap: 10px; }
.mpay-ref-approved-summary > div { padding: 14px; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--ref-border); border-radius: 12px; background: rgba(255,255,255,.018); }
.mpay-ref-approved-summary strong { color: #e8f1fb; font-size: 12px; }
.mpay-ref-approved-summary span,
.mpay-ref-approved-summary p { margin: 0; color: var(--ref-muted); font-size: 11px; line-height: 1.5; white-space: pre-wrap; }
.mpay-ref-secondary-action { height: 35px; margin-top: 16px; padding: 0 14px; border: 1px solid rgba(66,148,248,.38); border-radius: 12px; color: #9dccff; background: rgba(49,130,230,.09); font: inherit; font-size: 12px; cursor: pointer; }

body.mpay-ref-editor-active button,
body.mpay-ref-editor-active input,
body.mpay-ref-editor-active textarea,
body.mpay-ref-editor-active select { letter-spacing: 0 !important; }

@media (max-width: 1060px) {
  body.mpay-ref-editor-active .mpay-flow-bots-panel,
  body.mpay-ref-editor-active .mpay-welcome-editor,
  body.mpay-ref-editor-active .mpay-plans-editor { grid-template-columns: minmax(0,1fr) !important; }
  body.mpay-ref-editor-active [data-mpay-upsell-tools],
  body.mpay-ref-editor-active [data-mpay-downsell-tools] { grid-template-columns: 290px minmax(0,1fr) !important; }
}

@media (max-width: 880px) {
  body.mpay-ref-editor-active .mpay-ref-main { padding-inline: 14px !important; }
  .mpay-ref-header { margin-inline: -14px; padding-inline: 14px; }
  .mpay-ref-save-state, .mpay-ref-locale { display: none; }
  body.mpay-ref-editor-active .mpay-ref-stage { grid-template-columns: 1fr; gap: 12px; }
  .mpay-ref-nav { position: static; grid-column: 1; min-height: 0; padding: 10px; overflow-x: auto; display: flex; gap: 6px; border-radius: 14px; }
  .mpay-ref-nav-head, .mpay-ref-nav-group > span { display: none; }
  .mpay-ref-nav-group { display: flex; gap: 6px; margin: 0; }
  .mpay-ref-nav button { width: auto; min-width: max-content; margin: 0; padding-inline: 12px; }
  body.mpay-ref-editor-active :is(.mpay-flow-bots-panel,.mpay-welcome-editor,.mpay-plans-editor,[data-mpay-upsell-tools],[data-mpay-downsell-tools],[data-mpay-ref-payments]) { grid-column: 1; grid-row: 2; width: 100% !important; }
  body.mpay-ref-editor-active .mpay-flow-bots-panel,
  body.mpay-ref-editor-active .mpay-welcome-editor,
  body.mpay-ref-editor-active .mpay-plans-editor,
  body.mpay-ref-editor-active [data-mpay-upsell-tools],
  body.mpay-ref-editor-active [data-mpay-downsell-tools],
  body.mpay-ref-editor-active [data-mpay-ref-payments] { grid-template-columns: minmax(0,1fr) !important; }
  body.mpay-ref-editor-active :is(.mpay-cache-card,[data-mpay-welcome-part="Audio"],.mpay-ref-plans-side,.mpay-ref-conversion-aside,.mpay-ref-conversion-main) { grid-column: 1; grid-row: auto; }
  .mpay-ref-conversion-aside { min-height: 0; }
  .mpay-ref-payment-preview { position: static; }
}

@media (max-width: 620px) {
  .mpay-ref-header { height: auto; min-height: 62px; flex-wrap: wrap; gap: 8px; }
  .mpay-ref-title-block { width: auto; min-width: 0; flex: 1; }
  .mpay-ref-title-block strong { font-size: 14px; }
  .mpay-ref-help { display: none; }
  .mpay-ref-save { padding-inline: 12px; }
  .mpay-ref-save span { display: none; }
  .mpay-ref-nav { top: 62px; }
  .mpay-ref-plans-header { grid-template-columns: minmax(0,1fr) auto; }
  .mpay-ref-plans-header .mpay-ref-primary-action { grid-column: 1 / -1; width: 100%; }
  .mpay-ref-section-heading span { white-space: normal; }
}
