.maf-page .maf-app,
.maf-app--embedded { min-height: 62vh; display: flex; flex-direction: column; }
.maf-app--embedded .maf-list-view,
.maf-app--embedded .maf-wizard { padding: 1rem 1.25rem; }
.maf-wizard-steps { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.maf-wizard-step {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
}
.maf-wizard-step.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.maf-app--embedded .maf-body { min-height: 520px; }
.maf-app--embedded.maf-step-canvas {
  display: flex;
  flex-direction: column;
  min-height: 68vh;
}
.maf-app--embedded.maf-step-canvas .maf-wizard {
  flex: 0 0 auto;
  padding-bottom: 0.5rem;
}
.maf-app--embedded.maf-step-canvas #mafEditorBody {
  flex: 1 1 auto;
  min-height: 480px;
  display: grid !important;
}
.maf-app--embedded.maf-step-canvas .maf-canvas-wrap {
  min-height: 420px;
}
#mailMarketingAutomationPanel.growth-panel {
  min-height: 640px;
}
.maf-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #e8ecf1; background: #fff; }
.maf-toolbar-left, .maf-toolbar-center { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.maf-task-name { width: 220px; }
.maf-account-select { width: 180px; margin-left: auto; }
.maf-body { flex: 1; display: grid; grid-template-columns: 200px 1fr 280px; min-height: 560px; }
.maf-palette { border-right: 1px solid #e8ecf1; padding: 12px; background: #fafbfc; overflow-y: auto; }
.maf-palette-title { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.maf-palette-item { padding: 8px 10px; margin-bottom: 6px; border: 1px dashed #c5cdd8; border-radius: 8px; background: #fff; cursor: grab; font-size: 13px; }
.maf-palette-item:hover { border-color: #3b82f6; color: #1d4ed8; }
.maf-canvas-wrap { position: relative; overflow: hidden; background: #f8fafc; cursor: grab; touch-action: none; }
.maf-canvas-wrap.is-panning { cursor: grabbing; }
.maf-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; width: 4000px; height: 4000px; }
.maf-edges { position: absolute; left: 0; top: 0; width: 4000px; height: 4000px; pointer-events: none; z-index: 0; overflow: visible; }
.maf-nodes-layer { position: absolute; left: 0; top: 0; width: 4000px; height: 4000px; z-index: 1; }
.maf-node { position: absolute; z-index: 2; min-width: 200px; max-width: 260px; user-select: none; touch-action: none; transition: box-shadow 0.12s ease; }
.maf-node.is-dragging { z-index: 20; transition: none; filter: drop-shadow(0 8px 20px rgba(15, 23, 42, 0.15)); }
.maf-node-inner { border-radius: 12px; padding: 12px 14px; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); background: #fff; border: 2px solid transparent; }
.maf-node.is-selected .maf-node-inner { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.maf-node-type-start .maf-node-inner, .maf-node-type-end .maf-node-inner { background: #f1f5f9; border-color: #cbd5e1; text-align: center; font-weight: 600; }
.maf-node-type-send_email .maf-node-inner { border-color: #3b82f6; }
.maf-node-type-wait .maf-node-inner { background: #ef4444; color: #fff; border-color: #dc2626; text-align: center; font-weight: 600; }
.maf-node-type-condition .maf-node-inner { transform: rotate(0deg); border-color: #f97316; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); padding: 28px 20px; min-height: 88px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 12px; }
.maf-node-label { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.maf-node-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
.maf-node-sub { font-size: 12px; color: #64748b; margin-top: 4px; }
.maf-node-type-wait .maf-node-sub, .maf-node-type-wait .maf-node-label { color: rgba(255,255,255,0.9); }
.maf-port { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #64748b; z-index: 3; cursor: crosshair; }
.maf-port-in { left: 50%; top: -6px; transform: translateX(-50%); }
.maf-port-out { left: 50%; bottom: -6px; transform: translateX(-50%); }
.maf-port-yes { left: 20%; bottom: -6px; }
.maf-port-no { left: 80%; bottom: -6px; }
.maf-inspector { border-left: 1px solid #e8ecf1; padding: 12px; background: #fafbfc; overflow-y: auto; }
.maf-task-list { display: grid; gap: 10px; }
.maf-task-card { border: 1px solid #e8ecf1; border-radius: 10px; padding: 14px; background: #fff; cursor: pointer; transition: box-shadow .15s; }
.maf-task-card:hover { box-shadow: 0 6px 18px rgba(15,23,42,.08); }
.maf-task-card h6 { margin: 0 0 4px; }

.maf-hub { padding: 1rem 1.25rem 1.5rem; }
.maf-hub-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
@media (max-width: 992px) {
  .maf-hub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.maf-stat-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.maf-stat-card:hover { border-color: #93c5fd; box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08); }
.maf-stat-label { display: block; font-size: 0.78rem; color: #64748b; margin-bottom: 0.25rem; }
.maf-stat-card strong { font-size: 1.35rem; color: #0f172a; line-height: 1.2; }
.maf-hub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.maf-hub-toolbar-left,
.maf-hub-toolbar-right { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.maf-hub-toolbar-left .form-control,
.maf-hub-toolbar-left .form-select { width: auto; min-width: 140px; }
.maf-hub-list { display: flex; flex-direction: column; gap: 0.65rem; }
.maf-hub-card {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  background: #fff;
}
.maf-hub-card-main {
  display: flex;
  gap: 0.75rem;
  flex: 1 1 320px;
  min-width: 0;
  cursor: pointer;
}
.maf-hub-check { margin: 0; padding-top: 0.15rem; }
.maf-hub-card-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.maf-intent-strip {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.maf-create-drawer { width: min(420px, 92vw); }
.maf-preset-grid { display: grid; gap: 0.65rem; }
.maf-preset-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  background: #fff;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.maf-preset-card:hover { border-color: #3b82f6; box-shadow: 0 6px 16px rgba(59, 130, 246, 0.12); }
.maf-preset-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: #64748b;
}
.maf-preset-preview i { font-style: normal; color: #94a3b8; }
.maf-preset-locked { border: 1px dashed #e2e8f0; border-radius: 12px; background: #fafbfc; }
.maf-tab-vip-badge { display: inline-flex; vertical-align: middle; transform: scale(0.92); transform-origin: left center; }
.maf-tab-vip-badge .customs-vip-pill-inner { padding: 0.08rem 0.35rem 0.1rem; }
.maf-stats-detail { padding: 0 0 1rem; }
.maf-stats-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.maf-stats-detail-body { background: #fff; border: 1px solid #e8ecf1; border-radius: 12px; padding: 1rem; }
.maf-stat-mini { border: 1px solid #e8ecf1; border-radius: 10px; padding: 0.65rem 0.75rem; background: #f8fafc; }
.maf-stat-mini span { display: block; font-size: 0.72rem; color: #64748b; }
.maf-stat-mini strong { font-size: 1.1rem; color: #0f172a; }
.customs-results-bulk-bar { background: #fff; }
.maf-edge-path { fill: none; stroke: #94a3b8; stroke-width: 2; }
.maf-edge-path.is-temp { stroke-dasharray: 6 4; stroke: #3b82f6; }
