*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
:root{
  --sidebar-w: 232px;
  --canvas:#eef0f4;
  --node:#fff;
  --head:#f7f8fa;
  --b:#dde1e8;
  --bh:#b8c0cc;
  --active:#22c55e;
  --text:#111827;
  --t2:#6b7280;
  --t3:#9ca3af;
  --blue:#3b82f6;
  --red:#ef4444;
  --green:#22c55e;
  --edge:#878787;
  --edge-stroke-width:2.8px;
  --port-stroke-width:1.8px;
}
body{font-family:"Inter","Helvetica Neue","Segoe UI",Arial,sans-serif;background:var(--canvas);height:100vh;overflow:hidden;display:flex;flex-direction:column;}
body, body *{font-weight:400!important;font-style:normal!important;}

.topbar{height:72px;background:#fff;border-bottom:none;box-shadow:0 1px 0 rgba(0,0,0,.07),0 4px 24px rgba(0,0,0,.05);display:flex;align-items:center;justify-content:space-between;padding:0;gap:0;z-index:200;flex-shrink:0;}
.topbar-brand{
  width:var(--sidebar-w);
  min-width:var(--sidebar-w);
  height:100%;
  padding:0 18px;
  display:flex;
  align-items:center;
  gap:12px;
  border-right:1px solid #d9e1eb;
  flex-shrink:0;
}
.topbar-brand-copy{
  position:relative;
  display:inline-block;
  height:38px;
  vertical-align:top;
}
.topbar-brand-mark{
  width:38px;
  height:38px;
  border-radius:14px;
  object-fit:cover;
  display:block;
  flex-shrink:0;
  box-shadow:0 0 0 1px rgba(0,0,0,.07),0 2px 8px rgba(0,0,0,.12);
}
.topbar-brand-wordmark{
  display:block;
  font-size:22px;
  line-height:1;
  color:#111827;
  letter-spacing:-0.055em;
  font-weight:600!important;
  white-space:nowrap;
  padding-top:1px;
}
.topbar-alice-badge{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-width:0;
  overflow:hidden;
  padding:2px 7px;
  border-radius:999px;
  background:linear-gradient(135deg, rgba(109,40,217,.1) 0%, rgba(167,139,250,.18) 100%);
  border:1px solid rgba(139,92,246,.3);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 1px 4px rgba(109,40,217,.12);
}
.topbar-alice-badge::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  overflow:hidden;
  background:linear-gradient(105deg,transparent 0%,transparent 30%,rgba(255,255,255,.5) 50%,transparent 70%,transparent 100%);
  background-size:250% 100%;
  background-position:-100% 0;
  animation:alice-shimmer 6s ease-in-out infinite 1s;
  pointer-events:none;
  clip-path:inset(0 round 999px);
}
@keyframes alice-shimmer{
  0%{background-position:-100% 0;}
  30%{background-position:200% 0;}
  100%{background-position:200% 0;}
}
.topbar-alice-mark,
.builder-topbar-mark{
  width:13px;
  height:14px;
  flex-shrink:0;
  display:block;
  overflow:visible;
  border-radius:44% 44% 48% 48% / 36% 36% 58% 58%;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.92) 0, rgba(255,255,255,.92) 16%, rgba(255,255,255,0) 33%),
    radial-gradient(circle at 68% 70%, rgba(117,58,255,.45) 0, rgba(117,58,255,0) 44%),
    linear-gradient(135deg, #6d28d9 0%, #8b5cf6 48%, #a855f7 100%);
  box-shadow:inset 0 1.5px 2px rgba(255,255,255,.45), inset 0 -2px 6px rgba(91,33,182,.18), 0 2px 5px rgba(124,58,237,.18);
}
.auth-reset-note{
  font-size:13px;
  line-height:1.45;
  color:#667085;
}
.auth-secondary-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
}
.auth-link-btn{
  border:none;
  background:none;
  padding:0;
  color:#4f46e5;
  font-size:13px;
  cursor:pointer;
}
.auth-link-btn:hover{
  color:#4338ca;
  text-decoration:underline;
}
.topbar-alice-text{
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:9.5px;
  line-height:1;
  color:#5b21b6;
  font-weight:500!important;
  letter-spacing:.01em;
}
.topbar-left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1;
  padding:0 20px;
}
.logo{font-size:14px;font-weight:700;color:var(--text);display:flex;align-items:center;gap:9px;letter-spacing:-0.01em;}
.logo-m{
  width:28px;
  height:28px;
  border-radius:8px;
  display:block;
  object-fit:cover;
  box-shadow:0 1px 2px rgba(15,23,42,.08);
  flex-shrink:0;
}
.vsep{width:1px;height:22px;background:#e3e8ef;}
.topbar-crumbs{display:flex;align-items:center;gap:8px;min-width:0;color:#8a94a6;font-size:13px;}
.topbar-crumb{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.topbar-crumb.current{color:#445064;}
.topbar-crumb-sep{color:#bac2cf;}
.fname{font-size:13px;color:var(--t2);padding:4px 8px;border-radius:5px;cursor:pointer;}
.fname:hover{background:#f3f4f6;color:var(--text);}
.scenario-select{
  min-width:220px;max-width:320px;height:32px;padding:0 10px;border-radius:8px;
  border:1px solid var(--b);background:#fff;color:var(--text);font-size:13px;font-family:inherit;
}
.tr{margin-left:auto;display:flex;align-items:center;gap:8px;}
.btn{height:34px;padding:0 13px;border-radius:10px;font-size:12px;border:1px solid #dde4ee;background:#fff;color:#5f6c80;cursor:pointer;font-family:inherit;transition:all .1s;display:flex;align-items:center;gap:5px;}
.btn:hover{background:#f3f4f6;color:var(--text);}
.btn.p{background:var(--blue);color:#fff;border-color:var(--blue);}
.btn.p:hover{background:#2563eb;}
.balance-btn{gap:8px;padding-inline:12px;}
.balance-btn-label{color:#64748b;}
.balance-btn-value{color:#0f172a;font-weight:700;}
.saved{font-size:11px;color:var(--t3);display:flex;align-items:center;gap:4px;}
.sdot{width:5px;height:5px;border-radius:50%;background:var(--green);}

.main{display:flex;flex:1;overflow:hidden;position:relative;}
:root{
  --builder-side-panel-w: 342px;
  --builder-side-panel-w-compact: 336px;
  --builder-popover-border:#e2e8f0;
  --builder-popover-radius:9px;
  --builder-popover-shadow:0 18px 42px rgba(15,23,42,.10), 0 6px 16px rgba(15,23,42,.05);
  --builder-popover-max-h:620px;
  --builder-popover-edge-h:58px;
  --builder-popover-x-pad:22px;
  --builder-popover-left:calc(var(--sidebar-w) + 270px);
  --builder-popover-header-bg:#fff;
  --builder-popover-title:#1f2937;
  --builder-popover-muted:#707784;
}

/* ── Intent detail panel (right sub-panel) ── */
.intent-detail-panel{
  position:absolute;
  top:16px;
  bottom:auto;
  left:var(--builder-popover-left);
  width:0;
  box-sizing:border-box;
  background:#fff;
  border:1px solid var(--builder-popover-border);
  border-radius:var(--builder-popover-radius);
  z-index:120;
  overflow:visible;
  transition:opacity .18s ease, box-shadow .18s ease, top .18s ease;
  opacity:0;
  pointer-events:none;
  display:flex;
  flex-direction:column;
  max-height:var(--builder-popover-max-h);
  box-shadow:none;
  font-family:"Inter","Helvetica Neue","Segoe UI",Arial,sans-serif;
  color:#202733;
}
.intent-detail-panel.open{
  width:var(--builder-side-panel-w);
  opacity:1;
  pointer-events:auto;
  box-shadow:var(--builder-popover-shadow);
  overflow:visible;
}
.intent-detail-panel.idp-compact.open{
  max-height:340px !important;
}
.cbox.disabled,
.intent-current-add.is-disabled,
.listen-empty-btn.is-disabled{
  opacity:.55;
  cursor:not-allowed!important;
  pointer-events:auto;
  background:#f8fafc!important;
  color:#94a3b8!important;
  border-color:#dbe2ea!important;
}
.idp-header{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
  min-height:var(--builder-popover-edge-h);
  padding:10px 16px;
  border-bottom:1px solid rgba(226,232,240,.72);
  position:sticky;
  top:0;
  background:var(--builder-popover-header-bg);
  border-radius:calc(var(--builder-popover-radius) - 1px) calc(var(--builder-popover-radius) - 1px) 0 0;
  z-index:1;
}
.idp-close{
  width:34px;
  height:34px;
  border:none;
  border-radius:10px;
  background:transparent;
  cursor:pointer;
  color:#2D69DA;
  font-size:24px;
  line-height:1;
  padding:0;
  margin-left:auto;
  transition:color .1s, background .1s;
}
.idp-close:hover{color:#1d4ed8;background:rgba(255,255,255,.45);}
.idp-title{
  font-size:18px;
  font-weight:600!important;
  line-height:1.18;
  color:var(--builder-popover-title);
  flex:0 1 70%;
  min-width:0;
  max-width:70%;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  word-break:break-word;
}
.idp-title.idp-title-md{
  font-size:16px;
  line-height:1.16;
}
.idp-title.idp-title-sm{
  font-size:15px;
  line-height:1.16;
}
.idp-title.idp-title-xs{
  font-size:13px;
  line-height:1.2;
}
.idp-title-input{
  width:100%;
  flex:1 1 auto;
  min-width:0;
  max-width:70%;
  height:32px;
  border:2px solid #d7dee9;
  border-radius:10px;
  background:#fff;
  padding:0 12px;
  font-size:18px;
  line-height:1.18;
  font-weight:600!important;
  color:#111827;
  outline:none;
  box-shadow:0 1px 0 rgba(255,255,255,.75), inset 0 1px 2px rgba(15,23,42,.04);
}
.idp-title-input:focus{
  border-color:#c9d5e6;
}
.idp-edit-btn{
  width:30px;
  height:30px;
  border:none;
  background:transparent;
  color:#7c6f6b;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  border-radius:10px;
  flex-shrink:0;
}
.idp-edit-btn svg{
  width:18px;
  height:18px;
}
.idp-edit-btn:hover{
  background:rgba(255,255,255,.45);
  color:#5f5551;
}
.idp-badge{
  display:none;
}
.idp-body{
  padding:18px var(--builder-popover-x-pad);
  display:flex;
  flex-direction:column;
  gap:14px;
  flex:0 0 auto;
  min-height:auto;
  overflow:visible;
}
.intent-detail-panel.idp-scrollable .idp-body{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
}
.intent-detail-panel.idp-compact .idp-body{
  padding-top:18px;
  padding-bottom:18px;
  gap:12px;
}
.idp-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
}
.idp-label{
  font-family:"Inter","Helvetica Neue","Segoe UI",Arial,sans-serif;
  font-size:13px;
  font-weight:400!important;
  color:#202733;
  line-height:1.28;
}
.idp-hint{
  font-size:12px;
  color:#707784;
  line-height:1.42;
}
.idp-body .pi,
.idp-body .psel{
  min-height:42px;
  padding:0 12px;
  border:1px solid #dbe2ea;
  border-radius:12px;
  background:#fff;
  font-family:"Inter","Helvetica Neue","Segoe UI",Arial,sans-serif;
  font-size:14px;
  line-height:1.3;
  font-weight:400!important;
  color:#202733;
  outline:none;
}
.idp-body .pi:focus,
.idp-body .psel:focus{
  border-color:#9bbcff;
  box-shadow:0 0 0 3px rgba(45,105,218,.10);
}
.idp-phrase-list{margin-bottom:2px;}
.idp-phrase-add{display:flex;gap:6px;align-items:center;}
.idp-phrase-add .pi{flex:1;min-width:0;}
.idp-phrase-add .audio-tts-btn{flex-shrink:0;padding:0 12px;}
.idp-toggle-card{
  padding:14px 16px;
  background:#fff;
  border:1px solid #dbe2ea;
  border-radius:14px;
}
.idp-phrase-editor{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.idp-add-phrase-btn{
  width:auto;
  align-self:flex-start;
  min-height:46px;
  padding:0 18px;
  margin-top:0;
  min-width:164px;
}
.idp-extractions{display:flex;flex-direction:column;gap:0;}
.idp-extraction-row{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:8px 0;
}
.idp-extraction-header{display:flex;align-items:center;justify-content:space-between;}
.idp-extraction-num{font-size:12px;font-weight:400!important;color:#707784;line-height:1.3;}
.idp-extraction-rm{background:none;border:none;cursor:pointer;color:#94a3b8;font-size:16px;line-height:1;padding:0;transition:color .1s;}
.idp-extraction-rm:hover{color:#ef4444;}
.idp-extraction-divider{height:1px;background:#eceff3;margin:2px 0;}
.idp-goal-textarea{
  resize:vertical;
  min-height:82px;
  padding:10px 12px!important;
  font-size:14px!important;
  line-height:1.38!important;
}
.idp-footer{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-shrink:0;
  min-height:var(--builder-popover-edge-h);
  padding:10px var(--builder-popover-x-pad);
  border-top:1px solid #eef2f7;
  background:#fff;
  border-radius:0 0 calc(var(--builder-popover-radius) - 1px) calc(var(--builder-popover-radius) - 1px);
}
.idp-footer .audio-tts-btn{
  margin-top:0;
  width:auto;
  min-width:0;
  min-height:32px;
  padding:0 28px;
  border-radius:5px;
}
.idp-footer .audio-tts-btn.secondary{
  color:#ef4444;
  border:none;
  background:transparent;
  min-width:0;
  padding:0;
  height:auto;
  min-height:0;
  border-radius:0;
}
.idp-footer .audio-tts-btn.secondary:hover{
  background:transparent;
  color:#dc2626;
}
.idp-remove-btn{
  display:inline-flex;
  align-items:center;
  gap:12px;
}
.idp-remove-icon{
  width:26px;
  height:26px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.idp-remove-icon svg{
  width:24px;
  height:24px;
}
.idp-footer .audio-tts-btn:not(.secondary){
  min-width:55px;
  padding:0 11px;
}
.idp-footer-spacer{
  flex:1;
}

/* ── Mid panel (ManyChat-style block editor) ── */
.mid-panel{
  position:absolute;
  top:0;
  bottom:0;
  left:var(--sidebar-w);
  width:0;
  box-sizing:border-box;
  overflow:hidden;
  background:#fff;
  border-right:1px solid var(--b);
  transition:width .18s ease, box-shadow .18s ease, opacity .16s ease, transform .18s ease;
  display:flex;
  flex-direction:column;
  z-index:80;
  box-shadow:none;
  opacity:0;
  transform:translateX(-14px);
  pointer-events:none;
}
.mid-panel.open{
  width:var(--builder-side-panel-w);
  overflow-y:auto;
  box-shadow:10px 0 28px rgba(15,23,42,.08);
  opacity:1;
  transform:translateX(0);
  pointer-events:auto;
}
.mid-panel-back{
  background:none;border:none;cursor:pointer;
  font-size:17px;color:var(--t3);padding:0 6px 0 0;
  line-height:1;flex-shrink:0;
  transition:color .1s;
}
.mid-panel-back:hover{color:var(--text);}

.sidebar{width:var(--sidebar-w);background:#F3F5F7;border-right:1px solid #e2e8f0;overflow:hidden;flex-shrink:0;display:flex;flex-direction:column;}
.sidebar-brand{
  padding:0;
  background:#F3F5F7;
  border-bottom:1px solid #d9e1eb;
  flex-shrink:0;
  position:relative;
}
.sidebar-scenario-switch{
  width:100%;
  margin:0;
  min-height:58px;
  padding:10px 16px;
  border:none;
  border-radius:0;
  background:#F3F5F7;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  text-align:left;
  color:#1f2937;
  cursor:pointer;
}
.sidebar-scenario-switch-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.sidebar-scenario-caption{
  font-size:10px;
  color:#8b95a5;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.sidebar-scenario-value{
  font-size:13px;
  color:#253143;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.sidebar-scenario-chevron{
  font-size:16px;
  color:#6d7b8f;
  flex-shrink:0;
  transition:transform .16s ease;
}
.sidebar-scenario-switch.open .sidebar-scenario-chevron{transform:rotate(180deg);}
.sidebar-scenario-dropdown{
  position:absolute;
  left:0;
  right:0;
  top:100%;
  background:#fff;
  border-top:1px solid #d9e1eb;
  border-bottom:1px solid #d9e1eb;
  border-radius:0;
  box-shadow:0 18px 28px rgba(15,23,42,.10);
  padding:8px;
  display:none;
  z-index:40;
}
.sidebar-scenario-dropdown.open{display:block;}
.sidebar-scenario-item{
  width:100%;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:10px 11px;
  border:none;
  background:#fff;
  border-radius:0;
  cursor:pointer;
  text-align:left;
}
.sidebar-scenario-item:hover{background:#f6f9fe;}
.sidebar-scenario-item.active{background:#edf4ff;}
.sidebar-scenario-item-copy{min-width:0;}
.sidebar-scenario-item-name{
  font-size:13px;
  color:#253143;
  line-height:1.35;
}
.sidebar-scenario-item-sub{
  margin-top:3px;
  font-size:11px;
  color:#788497;
  line-height:1.4;
}
.sidebar-scenario-item-add{
  margin-top:6px;
  width:100%;
  height:36px;
  border:1px dashed #bfd5fb;
  border-radius:0;
  background:#eff6ff;
  color:#2563eb;
  cursor:pointer;
  font-size:13px;
}
.sidebar-workspace-nav{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:12px 10px 10px;
  border-bottom:1px solid #eaf0f7;
  background:#fff;
  flex-shrink:0;
}
.sidebar-tab{
  min-height:38px;
  padding:0 12px;
  border:none;
  border-radius:0;
  background:transparent;
  color:#6f7f95;
  font-size:13px;
  cursor:pointer;
  white-space:nowrap;
  font-family:inherit;
  transition:background .12s ease,color .12s ease;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
}
.sidebar-tab-ico{
  width:18px;
  height:18px;
  color:#8fa0b7;
  text-align:center;
  flex-shrink:0;
}
.sidebar-tab-ico svg{
  width:18px;
  height:18px;
  display:block;
}
.sidebar-tab:hover{background:#edf3fb;color:#334155;}
.sidebar-tab.active{background:#e6f0ff;color:#2563eb;}
.sidebar-tab.active .sidebar-tab-ico{color:#2563eb;}
.sidebar-panel{
  display:none;
  flex:1;
  overflow-y:auto;
}
.sidebar-panel.active{display:block;}
.ss{padding:14px 10px 8px;}
.st{font-size:10px;font-weight:600;color:var(--t3);letter-spacing:.08em;text-transform:uppercase;padding:0 6px;margin-bottom:6px;}
.sidebar-section-head{padding:0 6px 10px;}
.sidebar-section-copy{font-size:11px;color:#64748b;line-height:1.45;margin-bottom:10px;}
.sidebar-section-add{width:100%;}
.scenario-side-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:6px 6px 10px;
  position:relative;
  z-index:2;
}
.scenario-source-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  max-width:100%;
  padding:3px 10px 3px 7px;
  border-radius:999px;
  border:1px solid #dbe2ea;
  background:#f8fafc;
  color:#475569;
  flex-shrink:0;
}
.scenario-source-badge.blue{
  background:#eff6ff;
  border-color:#bfdbfe;
  color:#2563eb;
}
.scenario-source-badge.green{
  background:#f0fdf4;
  border-color:#bbf7d0;
  color:#15803d;
}
.scenario-source-badge.neutral{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#c2410c;
}
.scenario-source-badge.clickable{
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.scenario-source-badge.clickable:hover{
  transform:translateY(-1px);
  box-shadow:0 3px 10px rgba(194,65,12,.08);
}
.scenario-source-badge.clickable:focus-visible{
  outline:2px solid rgba(59,130,246,.25);
  outline-offset:2px;
}
.scenario-source-badge-icon{
  width:18px;
  height:18px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:700!important;
  background:rgba(255,255,255,.9);
  border:1px solid currentColor;
  line-height:1;
}
.scenario-source-badge-text{
  font-size:11px;
  font-weight:600!important;
  white-space:nowrap;
}
.sbi{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 6px 8px;
  padding:10px 12px;
  border:1px solid #dde4ee;
  border-radius:16px;
  background:#fff;
  cursor:grab;
  user-select:none;
  transition:border-color .14s ease, box-shadow .14s ease, background .14s ease, transform .14s ease;
}
.sbi:hover{
  background:#f8fbff;
  border-color:#bfd2ff;
  box-shadow:0 6px 16px rgba(148,163,184,.10);
  transform:translateY(-1px);
}
.sbi:active{cursor:grabbing;}
.si{width:32px;height:32px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;}
.si svg{width:18px;height:18px;display:block;}
.si-listen{color:#7c3aed;}
.si-activation{color:#f15a24;}
.si-end{color:#ef4444;}
.sn{font-size:12px;font-weight:600;color:var(--text);line-height:1.25;}
.sd{font-size:10px;color:var(--t3);line-height:1.35;margin-top:2px;}
.telephony-side-section{padding-top:4px;border-top:1px solid #eef2f7;margin-top:6px;}
.telephony-side-head{display:flex;flex-direction:column;gap:10px;padding:0 6px 8px;}
.telephony-side-copy{font-size:11px;color:var(--t2);line-height:1.45;}
.telephony-side-add{
  height:30px;border-radius:8px;border:1px dashed #bfdbfe;background:#eff6ff;color:#2563eb;
  font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;
}
.telephony-side-list{display:flex;flex-direction:column;gap:6px;padding:0 6px 10px;}
.telephony-side-card{
  border:1px solid var(--b);border-radius:20px;background:#fff;padding:10px;cursor:pointer;
  transition:border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
.telephony-side-card:hover{border-color:#bfdbfe;background:#f8fbff;}
.telephony-side-card.active{border-color:#93c5fd;box-shadow:0 0 0 2px rgba(59,130,246,.08);}
.telephony-side-name{font-size:12px;font-weight:700;color:#0f172a;line-height:1.3;}
.telephony-side-meta{font-size:10px;color:#64748b;margin-top:4px;line-height:1.45;}
.telephony-side-badges{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px;}
.telephony-side-badge{
  display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;
  font-size:10px;font-weight:700;border:1px solid #dbe2ea;color:#475569;background:#f8fafc;
}
.telephony-side-badge.green{background:#f0fdf4;border-color:#bbf7d0;color:#15803d;}
.telephony-side-badge.blue{background:#eff6ff;border-color:#bfdbfe;color:#2563eb;}
.sidebar-tool-card{
  margin:0 6px 10px;
  padding:12px;
  border:1px solid var(--b);
  border-radius:16px;
  background:#fff;
  cursor:pointer;
  transition:border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
.sidebar-tool-card:hover{
  border-color:#bfdbfe;
  background:#f8fbff;
}
.sidebar-tool-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
}
.sidebar-tool-title{
  font-size:12px;
  font-weight:700;
  color:#0f172a;
  line-height:1.3;
}
.sidebar-tool-copy{
  font-size:11px;
  color:#64748b;
  line-height:1.45;
  margin-bottom:10px;
}
.sidebar-tool-btn{
  width:100%;
}
.sidebar-mini-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin:6px 6px 10px;
}
.sidebar-mini-card{
  border:1px solid #e4e9f0;
  border-radius:16px;
  background:#fff;
  padding:10px 11px;
  cursor:pointer;
  transition:border-color .14s ease,background .14s ease,box-shadow .14s ease;
}
.sidebar-mini-card:hover{
  border-color:#c6d5eb;
  background:#fbfdff;
}
.sidebar-mini-card.active{
  border-color:#93c5fd;
  box-shadow:0 0 0 2px rgba(59,130,246,.08);
}
.sidebar-mini-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
}
.sidebar-mini-title{
  font-size:12px;
  font-weight:700;
  color:#0f172a;
  line-height:1.35;
}
.sidebar-mini-copy{
  margin-top:4px;
  font-size:11px;
  color:#64748b;
  line-height:1.45;
}
.sidebar-mini-active-panel{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #e6edf7;
}
.sidebar-mini-active-copy{
  font-size:11px;
  color:#64748b;
  line-height:1.45;
  margin-bottom:10px;
}
.sidebar-mini-settings-btn{
  width:100%;
}
.sidebar-mini-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:8px;
}
.sidebar-mini-empty{
  margin:8px 6px 10px;
  padding:16px 14px;
  border:1px dashed #d6dde7;
  border-radius:14px;
  background:#fbfcfe;
  font-size:12px;
  color:#7b8798;
  line-height:1.5;
  text-align:center;
}
.builder-inline-launch-card,
.builder-inline-card{
  border:1px solid #dfe7f1;
  border-radius:22px;
  background:#fff;
  box-shadow:none;
}
.builder-inline-launch-card{
  padding:18px 16px;
}
.builder-inline-launch-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  background:#faf5ff;
  border:1px solid #e9d5ff;
  color:#7c3aed;
  font-size:12px;
  font-weight:600;
}
.builder-inline-launch-title{
  margin-top:14px;
  font-size:20px;
  line-height:1.2;
  color:#0f172a;
  font-weight:700!important;
}
.builder-inline-launch-copy{
  margin-top:10px;
  color:#64748b;
  font-size:13px;
  line-height:1.6;
}
.builder-inline-launch-warnings{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.builder-inline-warning-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#fff7ed;
  border:1px solid #fed7aa;
  color:#c2410c;
  font-size:12px;
  font-weight:600;
}
.builder-inline-launch-btn{
  margin-top:16px;
  width:100%;
  height:46px;
  border:none;
  border-radius:16px;
  background:linear-gradient(135deg,#6d28d9 0%,#8b5cf6 52%,#a855f7 100%);
  color:#fff;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  font-family:inherit;
  box-shadow:0 12px 24px rgba(124,58,237,.18);
}
.builder-inline-launch-btn:hover{
  filter:brightness(1.02);
}
.builder-inline-card{
  padding:14px;
  height:100%;
  display:flex;
  flex-direction:column;
}
.builder-inline-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.builder-inline-title{
  font-size:16px;
  line-height:1.25;
  color:#0f172a;
  font-weight:700!important;
}
.builder-inline-copy{
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  line-height:1.5;
}
.builder-inline-close{
  width:32px;
  height:32px;
  border:1px solid #dbe3ee;
  border-radius:12px;
  background:#fff;
  color:#64748b;
  cursor:pointer;
  font-family:inherit;
}
.builder-chat-list-inline{
  min-height:220px;
  max-height:none;
  flex:1;
  margin-top:12px;
  padding-right:2px;
}
.builder-input-inline{
  min-height:88px;
  border-radius:16px;
}
.builder-compose-actions-inline{
  margin-top:2px;
}
.panel-assistant-callout{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin:0 0 16px;
  padding:14px 16px;
  border:1px solid #e8eef8;
  border-radius:18px;
  background:linear-gradient(135deg,#fbf7ff 0%,#f8fbff 100%);
}
.panel-assistant-callout-compact{
  margin-bottom:14px;
}
.panel-assistant-copy{
  min-width:0;
}
.panel-assistant-title{
  color:#111827;
  font-size:14px;
  font-weight:700!important;
}
.panel-assistant-sub{
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  line-height:1.5;
}
.panel-assistant-btn{
  flex-shrink:0;
  height:38px;
  padding:0 14px;
  border:none;
  border-radius:12px;
  background:#eef2ff;
  color:#5b21b6;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  font-family:inherit;
}
.panel-assistant-btn:hover{
  background:#e6e9ff;
}
.sidebar-steps-library.off{
  display:none;
}
.inspector-hidden{
  display:none!important;
}
.mc-step-shell{
  border:1px solid #e5eaf1;
  border-radius:36px;
  background:#fff;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(15,23,42,.05),0 2px 6px rgba(15,23,42,.03);
}
.mc-step-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding:16px 16px 14px;
  background:#fbfdfb;
  border-bottom:1px solid #eef2f6;
}
.mc-step-icon{
  width:28px;
  height:28px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:14px;
  background:#f0fdf4;
  color:#111827;
  flex-shrink:0;
}
.mc-step-title{
  font-size:16px;
  font-weight:600;
  color:#111827;
}
.mc-step-body{
  padding:16px;
}
.mc-step-btn{
  width:100%;
  min-height:46px;
  border:1px dashed #d5dce7;
  border-radius:28px;
  background:#fff;
  color:#2f6fed;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease;
}
.mc-step-btn:hover{
  background:#f6faff;
  border-color:#96b7ef;
}
.mc-step-divider{
  height:1px;
  background:#e8edf3;
  margin:16px 0 14px;
}
.mc-step-subtitle{
  font-size:12px;
  font-weight:500;
  color:#444;
  margin-bottom:12px;
}
.mc-step-card{
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid #d8dee8;
  border-radius:24px;
  background:#fff;
  min-height:64px;
  padding:12px 14px;
}
.mc-step-card-icon{
  width:34px;
  height:34px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
  background:#eff6ff;
  flex-shrink:0;
}
.mc-step-card-icon svg{
  width:20px;
  height:20px;
  display:block;
}
.mc-step-card-copy{
  min-width:0;
  flex:1;
}
.mc-step-card-title{
  font-size:13px;
  font-weight:600;
  color:#111827;
  line-height:1.3;
}
.mc-step-card-sub{
  margin-top:2px;
  font-size:12px;
  color:#6b7280;
  line-height:1.4;
}
.mc-step-card-clear{
  width:34px;
  height:34px;
  border:none;
  border-left:1px solid #e5e7eb;
  background:none;
  color:#4b5563;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  flex-shrink:0;
}
.mc-step-system-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  max-height:52vh;
  overflow-y:auto;
  padding-right:4px;
}
.mc-step-system-list::-webkit-scrollbar{
  width:8px;
}
.mc-step-system-list::-webkit-scrollbar-thumb{
  background:#dbe3f0;
  border-radius:999px;
}
.mc-step-system-list::-webkit-scrollbar-track{
  background:transparent;
}
.mc-step-system-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  border:1px solid #dbe3f3;
  border-radius:20px;
  background:#f8fbff;
  padding:16px;
}
.mc-step-system-head{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.mc-step-system-badge{
  width:max-content;
  padding:4px 10px;
  border-radius:999px;
  background:#eef3ff;
  color:#6d7fa8;
  font-size:12px;
  font-weight:700;
}
.mc-step-system-title{
  font-size:20px;
  line-height:1.25;
  font-weight:700;
  color:#1f2d3d;
}
.mc-step-system-sub{
  font-size:14px;
  line-height:1.5;
  color:#6f7d95;
}
.mc-step-system-editor{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.mc-step-system-editor-title{
  font-size:13px;
  font-weight:600;
  color:#42526b;
}
.mc-step-system-add{
  display:flex;
  gap:8px;
}
.mc-step-system-add .pi{
  flex:1;
}
.mc-step-system-empty,
.mc-step-system-note{
  font-size:12px;
  line-height:1.5;
  color:#7b8798;
}
.mc-step-system-target .mc-step-card{
  background:#fff;
}
.mc-step-system-remove{
  align-self:flex-start;
  margin-top:8px;
  background:none;
  border:1px solid #e5e7eb;
  border-radius:6px;
  cursor:pointer;
  font-size:12px;
  color:#ef4444;
  padding:3px 10px;
}
.mc-step-system-remove:hover{
  background:#fef2f2;
  border-color:#fca5a5;
}
.mc-step-system-add-section{
  padding:10px 16px 4px;
}
.mc-step-system-add-title{
  font-size:12px;
  font-weight:600;
  color:#6b7280;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:8px;
}
.mc-step-system-empty-hint{
  font-size:13px;
  color:#9ca3af;
  padding:4px 16px 0;
}
.mc-step-shell-start{
  border:1px solid #e5eaf1;
  border-radius:0;
  box-shadow:0 12px 28px rgba(22,192,111,.10),0 3px 8px rgba(15,23,42,.05);
}
.mc-step-shell-start .mc-step-head{
  background:linear-gradient(180deg,#e8ff9a 0%, #e4ff95 100%);
  border-bottom:1px solid #d8ecad;
  border-radius:0;
}
.mc-step-shell-start .mc-step-icon{
  background:rgba(255,255,255,.34);
  color:#95b700;
  border:1px solid rgba(149,183,0,.28);
}
.mc-step-shell-start .mc-step-icon svg{
  width:18px;
  height:18px;
  display:block;
}
.mc-step-shell-start .mc-step-title{
  color:#1f2937;
}
.mc-step-shell-start .mc-step-body{
  background:#fff;
  border-radius:0;
}
.mc-step-shell-start .mc-step-btn{
  border:2px dashed #d4d4d4;
  color:#8b8b8b;
  background:#fff;
}
.mc-step-shell-start .mc-step-btn:hover{
  background:#fafcec;
  border-color:#bddf8f;
  color:#64725e;
}
.mc-step-shell-start .mc-step-divider{
  background:#e8efd8;
}
.mc-step-shell-start .mc-step-subtitle{
  color:#5d6859;
}
.mc-step-shell-start .mc-step-card{
  border-color:#dfead5;
  background:#fcfef7;
}
.mc-step-shell-start .mc-step-card-icon{
  background:#eef8cf;
}
.mc-step-shell-start .mc-step-system-card{
  border-color:#dfead5;
  background:#fcfef7;
}
.mc-step-shell-start .mc-step-system-badge{
  background:#eef8cf;
  color:#7a8d2a;
}
.mc-step-shell-start .mc-step-system-title{
  color:#253143;
}
.mc-step-shell-start .mc-step-system-sub,
.mc-step-shell-start .mc-step-system-empty,
.mc-step-shell-start .mc-step-system-note{
  color:#6f7d73;
}
.mc-step-option-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.mc-step-option{
  display:flex;
  gap:10px;
  align-items:flex-start;
  border:1px solid #dbe2ea;
  border-radius:12px;
  background:#fff;
  padding:12px;
  cursor:pointer;
  transition:border-color .14s ease,background .14s ease;
}
.mc-step-option:hover{
  border-color:#bfdbfe;
  background:#f8fbff;
}
.mc-step-option-ico{
  font-size:18px;
  line-height:1;
  flex-shrink:0;
}
.mc-step-option-title{
  font-size:13px;
  font-weight:600;
  color:#111827;
}
.mc-step-option-sub{
  margin-top:2px;
  font-size:12px;
  color:#6b7280;
  line-height:1.4;
}
.mc-step-empty{
  padding:14px 12px;
  border:1px dashed #d7dee8;
  border-radius:12px;
  font-size:12px;
  color:#7b8798;
  line-height:1.5;
  text-align:center;
}

/* Start sidebar theme */
.start-editor-theme .ph2{
  background:linear-gradient(180deg,#e8ff9a 0%,#e2ff8a 100%);
  border-bottom:1px solid #d0ec80;
}
.start-editor-theme .phi{
  color:#6a8c00;
  background:rgba(255,255,255,.55);
  border-color:rgba(149,183,0,.3);
}
.start-editor-theme .ps{background:#fdfff6;border-bottom:1px solid #e4f0c0;}
.start-editor-theme .activation-section-copy{color:#6a8c00;}
.start-editor-theme .activation-empty-copy{color:#7a9010;}
.start-editor-theme .activation-current-divider{background:#daeaa0;}
.start-editor-theme .activation-sidebar-title{color:#1f2937;}
.start-editor-theme .activation-sidebar-edit-btn{color:#6a8c00;}
.start-editor-theme .activation-sidebar-edit-btn:hover{background:rgba(255,255,255,.5);color:#4a6800;}
.start-editor-theme .activation-method-list{
  --audio-method-hover-border:#6a8c00;
  --audio-method-hover-color:#4a6800;
  --audio-method-hover-bg:#fafff0;
}
/* Trigger type icon colors and sizes */
.start-trigger-icon-inbound{color:#2D69DA;background:#edf4ff;width:44px!important;height:44px!important;border-radius:14px!important;}
.start-trigger-icon-outbound{color:#d97706;background:#fff7ed;width:44px!important;height:44px!important;border-radius:14px!important;}
.start-trigger-icon-both{color:#7c3aed;background:#f4efff;width:44px!important;height:44px!important;border-radius:14px!important;}
.start-trigger-icon-inbound svg,.start-trigger-icon-outbound svg,.start-trigger-icon-both svg{width:26px!important;height:26px!important;}

.sidebar-footer{
  margin-top:auto;
  padding:12px 10px 14px;
  border-top:1px solid #eef2f7;
  background:#fbfcfe;
}
.sidebar-profile-card{
  padding:12px 14px;
  border:1px solid #e5ebf2;
  border-radius:0;
  background:#fff;
}
.sidebar-profile-title{
  font-size:11px;
  color:#7d8796;
  margin-bottom:4px;
}
.sidebar-profile-value{
  font-size:12px;
  color:#243041;
  line-height:1.45;
  word-break:break-all;
}
.sidebar-profile-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
}
.danger-outline{
  color:#dc2626;
  border-color:#fecaca;
}
.danger-fill{
  color:#fff;
  background:#dc2626;
  border-color:#dc2626;
}
.danger-fill:hover{
  background:#b91c1c;
  border-color:#b91c1c;
}

.auth-overlay{
  position:fixed;
  inset:0;
  z-index:5000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:rgba(15,23,42,.38);
  backdrop-filter:blur(6px);
}
.auth-overlay[hidden]{
  display:none !important;
}
.auth-card{
  width:min(440px, 100%);
  padding:24px;
  border-radius:28px;
  background:#fff;
  box-shadow:0 24px 60px rgba(15,23,42,.18);
}
.auth-brand{
  font-size:13px;
  font-weight:700;
  color:#7c3aed;
  margin-bottom:8px;
}
.auth-title{
  font-size:28px;
  line-height:1.1;
  color:#111827;
  font-weight:700;
}
.auth-copy{
  margin-top:8px;
  font-size:14px;
  line-height:1.5;
  color:#6b7280;
}
.auth-tabs{
  margin-top:18px;
  display:flex;
  gap:8px;
}
.auth-tab{
  flex:1;
  height:42px;
  border-radius:14px;
  border:1px solid #e5e7eb;
  background:#fff;
  color:#64748b;
  font-weight:600;
  cursor:pointer;
}
.auth-tab.active{
  border-color:#c4b5fd;
  background:#f5f3ff;
  color:#7c3aed;
}
.auth-message{
  margin-top:14px;
  padding:12px 14px;
  border-radius:16px;
  font-size:13px;
  line-height:1.5;
}
.auth-message.error{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}
.auth-message.success{
  background:#eff6ff;
  color:#1d4ed8;
  border:1px solid #bfdbfe;
}
.auth-message.neutral{
  background:#f8fafc;
  color:#475569;
  border:1px solid #e2e8f0;
}
.auth-link-card{
  margin-top:12px;
  padding:14px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid #dbe4f0;
}
.auth-link-card-title{
  font-size:13px;
  color:#64748b;
  margin-bottom:8px;
}
.auth-link-card-url{
  display:block;
  font-size:13px;
  line-height:1.5;
  color:#4338ca;
  word-break:break-all;
  text-decoration:none;
}
.auth-link-card-url:hover{
  text-decoration:underline;
}
.auth-link-card-actions{
  display:flex;
  gap:8px;
  margin-top:12px;
  flex-wrap:wrap;
}
.auth-form{
  margin-top:16px;
}
.auth-actions{
  margin-top:16px;
  display:flex;
  justify-content:flex-end;
}

.cw{flex:1;position:relative;overflow:hidden;}
#canvas{
  position:absolute;inset:0;
  background-color:var(--canvas);
  background-image:radial-gradient(circle,#bcc4d0 1.2px,transparent 1.2px);
  background-size:22px 22px;
}

#edges{position:absolute;inset:0;overflow:visible;z-index:1;}
#world{position:absolute;transform-origin:0 0;z-index:2;}

.node{
  position:absolute;width:255px;
  background:rgba(255,255,255,0.7);
  border:none;
  border-radius:28px;
  box-shadow:0 3px 8px rgba(15,23,42,.12),0 1px 2px rgba(15,23,42,.08);
  cursor:default;user-select:none;
  font-family:"Inter","Helvetica Neue","Segoe UI",Arial,sans-serif;
  transition:outline-color .15s,box-shadow .15s;
  backdrop-filter:blur(0px);
}
.node:hover{
  outline:2px solid transparent;
  outline-offset:0;
  box-shadow:0 4px 10px rgba(15,23,42,.14),0 1px 3px rgba(15,23,42,.09);
}
.node-start:hover{outline-color:#16c06f;}
.node-listen:hover{outline-color:#7c3aed;}
.node-listen.node-listen-activation:hover{outline-color:#f15a24;}
.node-json:hover{outline-color:#d4a017;}
.node-gpt:hover{outline-color:#8b5cf6;}
.node-end:hover{outline-color:#ef4444;}
.node-interrupt:hover{outline-color:#1f7a52;}
.node.sel{
  outline:2px solid var(--active);
  outline-offset:0;
  box-shadow:0 4px 10px rgba(15,23,42,.14),0 1px 3px rgba(15,23,42,.09)!important;
}
.node.edge-related-hover{
  outline:2px solid var(--active) !important;
  outline-offset:0;
  box-shadow:0 4px 10px rgba(15,23,42,.14),0 1px 3px rgba(15,23,42,.09)!important;
}
.node-start.edge-related-hover{outline-color:#16c06f !important;}
.node-listen.edge-related-hover{outline-color:#7c3aed !important;}
.node-listen.node-listen-activation.edge-related-hover{outline-color:#f15a24 !important;}
.node-json.edge-related-hover{outline-color:#d4a017 !important;}
.node-gpt.edge-related-hover{outline-color:#8b5cf6 !important;}
.node-end.edge-related-hover{outline-color:#ef4444 !important;}
.node-interrupt.edge-related-hover{outline-color:#1f7a52 !important;}

.nh{display:flex;align-items:center;gap:9px;padding:13px 15px 11px;background:#fbfcfe;border-radius:28px 28px 0 0;border-bottom:1px solid #eef2f6;}
.node-listen .nh{
  background:#f6f0ff;
  border-bottom-color:#e9ddff;
}
.node-listen.node-listen-activation .nh{
  background:#ffd9d1;
  border-bottom-color:#f4c1b7;
}
.node-json .nh{
  background:#FCEDAF;
  border-bottom-color:#f0d98a;
}
.activation-node-head{
  background:#ffd9d1;
  border-bottom-color:#f4c1b7;
}
.ni{width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;}
.ni svg{width:18px;height:18px;display:block;}
.node-listen .ni{color:#7c3aed;}
.node-listen-activation .ni{color:#f15a24;}
.node-listen-activation .ns{color:#b45309;}
.nt{flex:1;min-width:0;}
.ns{font-size:10px;color:var(--t3);line-height:1.2;letter-spacing:normal;}
.ntitle-row{display:flex;align-items:center;gap:6px;min-width:0;}
.ntitle{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:normal;line-height:1.1;}
.node-inline-title-input{
  min-width:0;
  width:100%;
  height:24px;
  padding:0 6px;
  border:1px solid #dbe4f0;
  border-radius:8px;
  background:#fff;
  color:#111827;
  font-size:13px;
  font-weight:600;
  line-height:1.1;
  outline:none;
}
.node-inline-title-input:focus{
  border-color:#bfd2ff;
  box-shadow:0 0 0 3px rgba(59,130,246,.12);
}
.node-title-edit{
  width:22px;
  height:22px;
  border:none;
  background:transparent;
  color:#94a3b8;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  cursor:pointer;
  flex-shrink:0;
  transition:background .15s ease,color .15s ease;
}
.node-title-edit:hover{
  background:#f1f5f9;
  color:#64748b;
}
.node-title-edit svg{
  width:15px;
  height:15px;
}
.nm{font-size:16px;color:var(--t3);cursor:pointer;padding:2px 4px;border-radius:4px;line-height:1;opacity:0;transition:opacity .1s;}
.node:hover .nm{opacity:1;}
.nm:hover{background:#e5e7eb;}
.nb{padding:14px 15px 20px;}
.cbox{border:1px dashed #cfd6e2;border-radius:60px;padding:18px;text-align:center;color:#9aa3b0;font-size:13px;min-height:62px;display:flex;align-items:center;justify-content:center;transition:border-color .12s ease,background .12s ease;letter-spacing:normal;line-height:1.35;background:#fff;}
.cbox.has{border-style:solid;border-color:#e3e8f0;color:var(--text);text-align:left;justify-content:flex-start;font-size:13px;letter-spacing:normal;line-height:1.45;background:#fff;}
.cbox:hover{border-color:#9db6e8;background:#fbfdff;}
.nrow{display:flex;align-items:center;gap:7px;padding:5px 0;font-size:12px;color:var(--t2);border-bottom:1px solid #f0f1f3;letter-spacing:normal;}
.nrow:last-child{border-bottom:none;}
.nrl{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.listen-empty-copy{
  margin:12px 0 14px;
  font-size:12px;
  color:#778090;
  line-height:1.5;
  letter-spacing:normal;
}
.listen-audio-card{
  width:100%;
  margin-left:0;
  min-height:72px;
  height:72px;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:12px 16px;
  border:1px dashed #b8cdfa;
  border-radius:12px;
  color:#1877F2;
  font-family:"Inter","SF Pro Text","Helvetica Neue",Arial,sans-serif;
  font-size:13px;
  font-weight:500;
  font-size:13px;
  line-height:1.45;
  background:rgba(91,141,239,.08);
  overflow:hidden;
}
.listen-audio-card:hover{
  background:rgba(91,141,239,.14);
  border-color:#b8cdfa;
}
.listen-audio-card.has{
  min-height:72px;
  height:72px;
  background:rgba(91,141,239,.10);
  border-color:#b8cdfa;
  border-radius:12px;
  box-shadow:none;
  color:#111827;
  font-weight:500;
}
.listen-audio-card.audio-playing{
  border-style:solid;
  border-color:#2563eb;
  background:rgba(37,99,235,.14);
  box-shadow:0 0 0 2px rgba(37,99,235,.12);
}
.listen-audio-card.long-label{
  min-height:72px;
  height:72px;
  align-items:center;
}
.listen-audio-label{
  display:block;
  width:100%;
  white-space:normal;
  overflow:hidden;
  text-overflow:ellipsis;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  line-clamp:2;
}
.audio-missing{
  border-color:#fecaca !important;
  background:#fff1f2 !important;
}
.audio-missing .listen-audio-label{
  color:#b91c1c !important;
}
.node-invalid{
  box-shadow:0 0 0 2px #fca5a5, 0 14px 34px rgba(220,38,38,.12);
}
.node-invalid .nh{
  background:#fff1f2;
}
.listen-empty-mode{
  padding-right:18px;
  padding-bottom:46px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.listen-filled-mode{
  padding-top:8px;
  padding-bottom:46px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.listen-add-intent-btn{
  margin-top:0;
}
.listen-empty-btn{
  width:100%;
  min-height:56px;
  padding:12px 16px;
  border:1px dashed #b8cdfa;
  border-radius:12px;
  background:#fff;
  color:#1877F2;
  font-family:"Inter","SF Pro Text","Helvetica Neue",Arial,sans-serif;
  font-size:13px;
  font-weight:500;
  letter-spacing:normal;
  cursor:pointer;
  transition:background .15s,border-color .15s;
  margin-top:2px;
}
.listen-empty-btn:hover{
  background:#f0f5ff;
  border-color:#b8cdfa;
}
.listen-meta-row{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:0;
  padding:0 2px;
  font-size:11px;
  color:#7b8594;
  line-height:1.4;
}
.listen-meta-row .nrl{
  color:#7b8594;
}
.listen-section-divider{
  position:relative;
  height:16px;
  margin:10px 2px 2px;
}
.listen-section-divider::before{
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:50%;
  height:1px;
  background:linear-gradient(90deg, rgba(191,203,222,0) 0%, rgba(191,203,222,.95) 16%, rgba(191,203,222,.95) 84%, rgba(191,203,222,0) 100%);
}
.listen-section-divider::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:8px;
  height:8px;
  border-radius:999px;
  background:#f8fbff;
  border:1px solid #d8e3f2;
  transform:translate(-50%,-50%);
  box-shadow:0 0 0 4px rgba(248,251,255,.9);
}
.listen-audio-section{
  margin-bottom:0;
}
.listen-filled-mode > .listen-activation-ports,
.listen-empty-mode > .listen-activation-ports{
  margin-top:2px;
}
.listen-audio-shell{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.node-json{
  width:255px;
}
.node-interrupt{
  width:255px;
}
.interrupt-step-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 16px 12px;
  background:#dff3e8;
  border-bottom:1px solid #bfe3cd;
  border-radius:28px 28px 0 0;
}
.interrupt-step-icon{
  width:24px;
  height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  color:#1f7a52;
}
.interrupt-step-icon svg{
  width:24px;
  height:20px;
}
.interrupt-step-copy{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.interrupt-step-title{
  font-size:15px;
  font-weight:700;
  color:#1c1c1e;
  font-family:"Inter",sans-serif;
}
.interrupt-step-phrase{
  order:-1;
  max-width:100%;
  padding:7px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.72);
  color:#265f48;
  font-size:12px;
  font-weight:600;
  line-height:1.35;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.json-step-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding:13px 16px 12px;
  background:#FCEDAF;
  border-bottom:1px solid #f0d98a;
  border-radius:28px 28px 0 0;
}
.json-step-icon{
  width:24px;
  height:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}
.json-step-icon svg{
  width:24px;height:20px;
}
.json-step-title{
  font-size:15px;
  font-weight:700;
  color:#1c1c1e;
  font-family:"Inter",sans-serif;
}
.json-node-body{
  padding:20px 18px 72px;
  display:flex;flex-direction:column;gap:0;
}
.json-action-desc{
  margin:0 0 14px;font-size:12px;color:#6b7280;line-height:1.5;letter-spacing:normal;
}
.json-action-box{
  width:100%;min-height:46px;padding:12px 16px;
  border:2px dashed #e6a817;border-radius:12px;
  background:#fff;color:#d97706;
  font-size:13px;font-weight:600;letter-spacing:normal;
  justify-content:center;
  text-align:center;
  cursor:pointer;
  transition:border-color .15s,background .15s,color .15s;
  display:flex;align-items:center;
}
.json-action-box:hover{
  border-color:#F4B657;
  background:#fffbef;
  color:#d97706;
}
.json-action-box.is-configured{
  min-height:68px;
  justify-content:flex-start;
  text-align:left;
  font-size:12px;
  font-weight:500;
  color:#334155;
  border-style:solid;
  background:#f7f9fc;
  border-color:#e5ebf3;
}
.interrupt-mode .listen-audio-card{
  background:rgba(103, 191, 145, 0.08);
  border-color:#9ad0ae;
  color:#205c45;
}
.interrupt-mode .listen-audio-card:hover{
  background:rgba(103, 191, 145, 0.14);
  border-color:#86c6a0;
}
.interrupt-row .intent-current-row-title{
  color:#1f2d3d;
}
.interrupt-row .intent-current-row-sub{
  color:#738195;
}
.interrupt-return-row{
  background:#f7fbf9;
}
.interrupt-activation-ports{
  margin-bottom:4px;
}
.listen-activation-ports{
  margin-bottom:0;
}
.activation-port-row{
  min-height:44px;
  border-radius:10px;
  padding:10px 12px;
}
.activation-port-row .intent-port-main{
  display:flex;
  align-items:center;
  min-width:0;
}
.activation-port-row .intent-port-name{
  font-size:14px;
  font-weight:400;
  color:#2D69DA;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.activation-system-port-row{
  background:#f0f4ff;
}
.activation-system-port-name{
  color:#2D69DA;
  opacity:0.75;
  font-size:12px;
}
.activation-card-list-copy .activation-system-pill{
  margin-left:0;
  font-size:11px;
  font-weight:700;
  line-height:1.2;
}
.interrupt-add-activation-btn{
  margin-top:8px;
}
.json-textarea{
  min-height:96px;
  resize:vertical;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  line-height:1.45;
}
.json-textarea-lg{
  min-height:160px;
}

.port-out-wrap{
  position:absolute;
  right:-7px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  gap:6px;
}
.listen-linear-port-out-wrap{
  top:auto;
  right:-6px;
  bottom:18px;
  transform:none;
}
.action-port-failure-wrap{
  top:auto;
  right:-6px;
  bottom:18px;
  transform:none;
}
.action-port-success-wrap{
  top:auto;
  right:-6px;
  bottom:37px;
  transform:none;
}
.action-port-then-failure{
  color:#dc2626;
}
.action-port-then-success{
  color:#16a34a;
}
.port-then-label{
  font-family:"Inter","Helvetica Neue","Segoe UI",Arial,sans-serif;
  font-size:12px;
  font-weight:400;
  letter-spacing:normal;
  color:#556070;
  white-space:nowrap;
  line-height:1;
}

.port-out-dot{
  width:14px;height:14px;border-radius:50%;
  background:#fff;border:var(--port-stroke-width) solid #8a95a8;
  cursor:crosshair;flex-shrink:0;
  transition:transform .12s;
}
.port-out-dot.connected{
  background:#8a95a8;
}
.port-out-dot.success{
  border-color:#16a34a;
  background:#fff;
}
.port-out-dot.success.connected{
  background:#16a34a;
  border-color:#16a34a;
}
.port-out-dot.failure{
  border-color:#dc2626;
  background:#fff;
}
.port-out-dot.failure.connected{
  background:#dc2626;
  border-color:#dc2626;
}
.port-out-dot:hover{transform:scale(1.35);}

.port-in{
  position:absolute;
  left:-8px;top:38px;
  width:16px;height:18px;
  cursor:crosshair;z-index:10;
}

.node-hbar{
  position:absolute;top:-56px;right:0;
  background:#fff;border:1px solid var(--b);border-radius:10px;
  display:flex;gap:2px;padding:5px;
  box-shadow:0 3px 12px rgba(0,0,0,.12);
  opacity:0;pointer-events:none;
  transition:opacity .15s;z-index:20;
}
.node::before{content:'';position:absolute;top:-60px;left:0;right:0;height:60px;}
.node:hover .node-hbar{opacity:1;pointer-events:auto;}
.node-hbar:hover{opacity:1;pointer-events:auto;}
.nhb{width:36px;height:36px;border:none;background:none;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;color:var(--t2);transition:background .1s;flex-shrink:0;}
.nhb:hover{background:#f3f4f6;}
.nhb.d{color:var(--red);}
.nhb.d:hover{background:#fff5f5;}

.trow{display:flex;align-items:center;gap:9px;padding:9px 10px;background:#f9fafb;border:1px solid var(--b);border-radius:9px;margin-bottom:5px;cursor:pointer;transition:all .1s;}
.trow:hover{border-color:var(--bh);background:#f0f2f5;}
.tico{width:22px;height:22px;border-radius:50%;background:#dbeafe;display:flex;align-items:center;justify-content:center;font-size:11px;flex-shrink:0;}
.ttitle{font-size:12px;font-weight:500;color:var(--text);}
.tadd{border:1.5px dashed var(--bh);border-radius:8px;padding:9px;text-align:center;font-size:12px;font-weight:500;color:var(--blue);cursor:pointer;transition:all .1s;}
.tadd:hover{border-color:var(--blue);background:#eff6ff;}

.panel{width:268px;background:#fff;border-left:1px solid var(--b);display:flex;flex-direction:column;flex-shrink:0;overflow-y:auto;}
.inspector-panel{
  position:absolute;
  top:18px;
  right:34px;
  width:0;
  min-width:0;
  height:0;
  background:transparent;
  border:none;
  overflow:visible;
  z-index:70;
  pointer-events:none;
}
.inspector-panel.collapsed{
  width:0;
  min-width:0;
}
.inspector-panel.audio-mode{
  position:absolute;
  inset:0;
  width:auto;
  min-width:0;
  height:auto;
  z-index:120;
  pointer-events:none;
}
.assistant-toggle{
  width:44px;
  height:44px;
  flex-shrink:0;
  border:1px solid #d9c8ff;
  border-radius:12px;
  background:
    linear-gradient(135deg,#f4e8ff 0%,#ead7ff 28%,#e2d0ff 52%,#f3e8ff 100%);
  background-size:220% 220%;
  color:#fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    0 8px 16px rgba(124,58,237,.12);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:auto;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease;
  animation:assistant-toggle-glow 4.2s ease-in-out infinite;
}
.assistant-toggle::before{
  content:"";
  position:absolute;
  inset:1px;
  border-radius:11px;
  background:
    radial-gradient(circle at 26% 22%, rgba(255,255,255,.72) 0, rgba(255,255,255,.46) 16%, rgba(255,255,255,0) 34%),
    linear-gradient(125deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 38%, rgba(167,139,250,.12) 68%, rgba(255,255,255,.1) 100%);
  pointer-events:none;
  mix-blend-mode:screen;
  opacity:.95;
  animation:assistant-toggle-sheen 5s ease-in-out infinite;
}
.assistant-toggle:hover{
  transform:translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.72),
    0 10px 18px rgba(124,58,237,.16);
  filter:saturate(1.04);
}
.assistant-toggle-label{
  font-size:10px;
  letter-spacing:.03em;
  font-weight:700!important;
  text-transform:uppercase;
  color:#7c3aed;
  text-shadow:none;
  position:relative;
  z-index:1;
}
.assistant-toggle[aria-expanded="true"]{
  animation-duration:2.8s;
}
@keyframes assistant-toggle-glow{
  0%,100%{
    background-position:0% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.65),
      0 8px 16px rgba(124,58,237,.12);
    filter:saturate(1);
  }
  50%{
    background-position:100% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.78),
      0 10px 20px rgba(124,58,237,.2);
    filter:saturate(1.08);
  }
}
@keyframes assistant-toggle-sheen{
  0%,100%{
    opacity:.78;
    transform:translateX(0);
  }
  50%{
    opacity:1;
    transform:translateX(1px);
  }
}
.assistant-panel{
  position:absolute;
  top:58px;
  right:56px;
  width:min(380px, calc(100vw - var(--sidebar-w) - 150px));
  max-width:380px;
  height:min(760px, calc(100vh - 110px));
  padding:14px;
  overflow:auto;
  border:1px solid #dfe7f1;
  border-radius:28px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%);
  box-shadow:0 24px 56px rgba(15,23,42,.12),0 6px 18px rgba(15,23,42,.08);
  opacity:1;
  transform:translateY(0) scale(1);
  transform-origin:top right;
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:auto;
}
.assistant-panel.audio-popover{
  top:16px;
  right:auto;
  left:var(--builder-popover-left);
  width:var(--builder-side-panel-w);
  max-width:none;
  height:auto;
  max-height:var(--builder-popover-max-h);
  padding:0;
  overflow:hidden;
  border:1px solid var(--builder-popover-border);
  border-radius:var(--builder-popover-radius);
  background:#fff;
  box-shadow:var(--builder-popover-shadow);
  display:flex;
  flex-direction:column;
}
/* ── Audio detail panel (popup like IDP) ── */
.audio-detail-panel{
  position:absolute;
  top:16px;
  bottom:auto;
  left:var(--builder-popover-left);
  width:0;
  box-sizing:border-box;
  background:#fff;
  border:1px solid var(--builder-popover-border);
  border-radius:var(--builder-popover-radius);
  z-index:120;
  overflow:hidden;
  transition:opacity .18s ease, box-shadow .18s ease;
  opacity:0;
  pointer-events:none;
  display:flex;
  flex-direction:column;
  max-height:var(--builder-popover-max-h);
  box-shadow:none;
  font-family:"Inter","Helvetica Neue","Segoe UI",Arial,sans-serif;
  color:#202733;
}
.audio-detail-panel.open{
  width:var(--builder-side-panel-w);
  opacity:1;
  pointer-events:auto;
  box-shadow:var(--builder-popover-shadow);
  overflow:visible;
}
/* ── Audio popup idp-style layout ── */
.ap-popup{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}
.ap-header{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
  min-height:var(--builder-popover-edge-h);
  padding:10px var(--builder-popover-x-pad);
  border-bottom:1px solid rgba(226,232,240,.72);
  background:var(--builder-popover-header-bg);
  border-radius:calc(var(--builder-popover-radius) - 1px) calc(var(--builder-popover-radius) - 1px) 0 0;
}
.ap-title{
  font-size:20px;
  font-weight:700;
  color:var(--builder-popover-title);
  flex:1;
  min-width:0;
  line-height:1.1;
}
.ap-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
}
.ap-section{
  padding:16px var(--builder-popover-x-pad);
  border-bottom:1px solid #eef2f7;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.ap-section:last-child{border-bottom:none;}
.ap-section-label{
  font-size:14px;
  font-weight:600;
  color:var(--builder-popover-title);
  line-height:1.2;
}
.ap-section-hint{
  font-size:12px;
  color:#6b7280;
  line-height:1.5;
}
.ap-audio-method-list{
  padding-left:0;
  padding-right:0;
  padding-bottom:0;
}
.ap-method-expanded{
  padding:0 var(--builder-popover-x-pad);
}
.ap-method-expanded-top{
  margin-bottom:12px;
}
.ap-method-expanded-hidden{
  display:none;
}
.ap-body .audio-preview-box{
  margin:12px var(--builder-popover-x-pad) 0;
}
.ap-footer{
  display:flex;
  align-items:center;
  flex-shrink:0;
  min-height:var(--builder-popover-edge-h);
  padding:10px var(--builder-popover-x-pad);
  border-top:1px solid #eef2f7;
  background:#fff;
  border-radius:0 0 calc(var(--builder-popover-radius) - 1px) calc(var(--builder-popover-radius) - 1px);
}
.ap-done-btn{
  margin-top:0;
  margin-left:auto;
  width:auto;
  min-width:55px;
  min-height:32px;
  padding:0 28px;
  border-radius:5px;
}
.inspector-panel.collapsed .assistant-panel{
  opacity:0;
  pointer-events:none;
  transform:translateX(14px) scale(.96);
}
.pe{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--t3);font-size:13px;gap:8px;padding:24px;text-align:center;}
.ph2{
  min-height:58px;
  padding:10px 14px;
  border-bottom:1px solid #dde6f2;
  display:flex;
  align-items:center;
  gap:10px;
}
.mid-panel .pht{font-size:12px;}
.mid-panel .ps{padding:10px 20px;}
.mid-panel .pl{font-size:9px;margin-bottom:5px;}
.mid-panel .pi,
.mid-panel .psel{padding:6px 8px;font-size:11px;}
.mid-panel .mbtn{height:30px;padding:0 12px;font-size:11px;}
.phi{
  width:32px;
  height:32px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(255,255,255,.85);
  box-shadow:0 2px 6px rgba(15,23,42,.06);
  font-size:16px;
}
.phi svg{width:18px;height:18px;display:block;}
.phi-action{
  width:32px;
  height:32px;
}
.phi-action svg{
  width:18px;
  height:18px;
  display:block;
}
.pht{font-size:14px;font-weight:700;color:#1f2937;line-height:1.1;}
.ps{padding:13px 16px;border-bottom:1px solid var(--b);}
.ps:last-child{border-bottom:none;}
.pl{font-size:10px;font-weight:600;color:var(--t3);text-transform:uppercase;letter-spacing:.07em;margin-bottom:7px;}
.panel-editor-shell{
  min-height:100%;
  background:#fff;
}
.scenario-editor-theme .ph2{
  background:linear-gradient(180deg,#eef5ff 0%, #e5efff 100%);
  border-bottom:1px solid #cfe0fb;
}
.scenario-editor-theme .phi{color:#4f7bcf;}
.scenario-editor-theme .ps{background:#fbfdff;border-bottom:1px solid #dbe7fa;}
.scenario-editor-theme .pl{color:#6b86b5;}

.listen-editor-theme .ph2{
  background:linear-gradient(180deg,#f4ecff 0%, #efe4ff 100%);
  border-bottom:1px solid #dfcff8;
}
.listen-editor-theme .phi{color:#7c3aed;}
.listen-editor-theme .ps{background:#fcfbff;border-bottom:1px solid #e7def8;}
.listen-editor-theme .pl{color:#8565b4;}
.listen-editor-theme .listen-sidebar-section{
  background:#fff;
  border-bottom:none;
  padding:14px 20px;
}
.listen-section-copy{
  color:#8565b4;
  font-family:Inter, system-ui, sans-serif;
  font-size:9px;
  line-height:1.25;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.07em;
  margin:0 0 8px;
}
.listen-sidebar-divider{
  height:1px;
  margin:0 20px;
  background:#d9dee7;
}
.listen-sidebar-section .activation-current-first{
  margin-bottom:10px;
}
.listen-sidebar-section .activation-current-minimal .intent-current-toolbar{
  padding:0;
  max-width:100%;
  width:100%;
}
.listen-sidebar-section .intent-current-row,
.listen-sidebar-section .audio-method-card{
  box-sizing:border-box;
  max-width:100%;
  width:100%;
}
.listen-method-section{
  padding-bottom:4px!important;
}
.listen-method-buttons{
  padding-top:0!important;
}
/* Indent rows (audio/intents) by 20px on each side to match audio-method-list card width */
.listen-sidebar-section .activation-current-minimal .intent-current-toolbar{
  padding-left:20px;
  padding-right:20px;
}
/* Align section labels with left edge of buttons (+20px on top of section's own 20px padding) */
.listen-sidebar-section .listen-section-copy{
  padding-left:20px;
}
/* Settings section at bottom of listen sidebar */
.listen-settings-section{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:10px;
}
.listen-settings-section .intent-inline-grid{
  margin-bottom:0;
  padding:0 20px;
}
.listen-settings-section .intent-inline-section-label{
  font-family:Inter, system-ui, sans-serif;
  font-size:9px;
  letter-spacing:.07em;
}
.listen-toggle-row{
  display:flex;
  align-items:flex-start;
  gap:8px;
  padding:0 20px;
  cursor:pointer;
  user-select:none;
}
.listen-toggle-row input[type=checkbox]{
  margin-top:2px;
  flex-shrink:0;
  accent-color:#7c3aed;
  width:14px;
  height:14px;
}
.listen-toggle-label{
  font-size:13px;
  color:#1e1e2e;
  line-height:1.4;
}
.listen-delete-section{
  border-top:1px solid #d9dee7;
  border-bottom:none!important;
}
.listen-input-mode-row{
  padding:0 20px;
}
.listen-segmented{
  display:inline-flex;
  background:#ede9f8;
  border-radius:10px;
  padding:3px;
  gap:2px;
}
.listen-seg-btn{
  flex:1;
  height:28px;
  padding:0 16px;
  border:none;
  border-radius:8px;
  background:transparent;
  font-size:12px;
  font-weight:600;
  font-family:inherit;
  color:#7c3aed;
  cursor:pointer;
  transition:background .14s, color .14s, box-shadow .14s;
  white-space:nowrap;
}
.listen-seg-btn:hover{
  background:rgba(255,255,255,.6);
}
.listen-seg-btn.active{
  background:#fff;
  color:#5b21b6;
  box-shadow:0 1px 4px rgba(124,58,237,.15);
}

.activation-editor-theme .ph2{
  background:linear-gradient(180deg,#ffe2d8 0%, #ffd8cb 100%);
  border-bottom:1px solid #f2b8a2;
}
.activation-editor-theme .phi{color:#ea580c;}
.activation-editor-theme .ps{background:#fffdfb;border-bottom:1px solid #f3d3c6;}
.activation-editor-theme .pl{color:#b56b4e;}
.activation-sidebar-head{
  min-height:60px;
  padding:10px 16px;
  gap:12px;
}
.activation-sidebar-title-wrap{
  flex:1;
  min-width:0;
  display:flex;
  justify-content:center;
  align-items:center;
}
.activation-sidebar-title{
  font-size:20px;
  line-height:1.1;
  color:#1f2937;
  font-weight:700!important;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.activation-sidebar-title-input{
  width:100%;
  max-width:330px;
  height:36px;
  border:2px solid #d7dee9;
  border-radius:12px;
  background:#fff;
  padding:0 12px;
  font-size:20px;
  line-height:1.1;
  color:#111827;
  outline:none;
  box-shadow:0 1px 0 rgba(255,255,255,.75), inset 0 1px 2px rgba(15,23,42,.04);
}
.activation-sidebar-title-input:focus{
  border-color:#c9d5e6;
}
.activation-sidebar-edit-btn{
  width:30px;
  height:30px;
  border:none;
  background:transparent;
  color:#7c6f6b;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  border-radius:10px;
  flex-shrink:0;
}
.activation-sidebar-edit-btn:hover{
  background:rgba(255,255,255,.45);
  color:#5f5551;
}
.activation-sidebar-edit-btn svg{
  width:18px;
  height:18px;
  display:block;
}

.action-editor-theme{
  background:#fffdfa;
}
.action-editor-theme .ph2{
  background:linear-gradient(180deg,#fff1bf 0%, #feecad 100%);
  border-bottom:1px solid #f0d98a;
}
.action-editor-theme .phi{
  color:#d97706;
}
.action-editor-theme .pht{
  color:#1f2937;
}
.action-editor-theme .ps{
  border-bottom:1px solid #efe2b9;
  background:#fffdfa;
}
.action-editor-theme .pl{
  color:#9a7b2f;
}
.action-editor-theme .pi,
.action-editor-theme .psel,
.action-editor-theme .json-textarea{
  background:#fffef9;
  border-color:#ecdcae;
}
.action-editor-theme .pi:focus,
.action-editor-theme .psel:focus{
  border-color:#f4b657;
  background:#fff;
}
.action-editor-theme .mbtn,
.action-editor-theme .trigger-remove-btn{
  border-color:#f1cc72;
  background:#fff8e2;
  color:#b46c00;
}
.action-editor-theme .mbtn:hover,
.action-editor-theme .trigger-remove-btn:hover{
  background:#fff3cc;
}
.action-editor-theme .intent-fallback-note{
  color:#7d6b42;
}
.telephony-editor-theme .ph2,
.audio-editor-theme .ph2{
  background:linear-gradient(180deg,#e7f1ff 0%, #deebff 100%);
  border-bottom:1px solid #c7dafb;
}
.telephony-editor-theme .phi,
.audio-editor-theme .phi{
  color:#2563eb;
}
.telephony-editor-theme .ps,
.audio-editor-theme .ps{
  background:#fbfdff;
  border-bottom:1px solid #d8e5fb;
}
.telephony-editor-theme .pl,
.audio-editor-theme .pl{
  color:#6a87bd;
}
.audio-assistant-close{
  order:3;
  width:30px;
  height:30px;
  border:none;
  background:transparent;
  color:#1d4ed8;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  border-radius:10px;
  flex-shrink:0;
  font-size:22px;
  line-height:1;
  margin-left:auto;
}
.audio-assistant-close:hover{
  background:#f3f7ff;
}

.contacts-editor-theme .ph2{
  background:linear-gradient(180deg,#e8f8ff 0%, #ddf2ff 100%);
  border-bottom:1px solid #c4e4f6;
}
.contacts-editor-theme .phi{color:#0f766e;}
.contacts-editor-theme .ps{background:#fbfeff;border-bottom:1px solid #d5edf2;}
.contacts-editor-theme .pl{color:#5f8f94;}

.end-editor-theme .ph2{
  background:linear-gradient(180deg,#fff0f0 0%, #ffe6e6 100%);
  border-bottom:1px solid #f3cdcd;
}
.end-editor-theme .phi{color:#b91c1c;}
.end-editor-theme .ps{background:#fffdfd;border-bottom:1px solid #f3dddd;}
.end-editor-theme .pl{color:#b47b7b;}

.gpt-editor-theme .ph2{
  background:linear-gradient(180deg,#efe9ff 0%, #e8ddff 100%);
  border-bottom:1px solid #dac9fb;
}
.gpt-editor-theme .phi{color:#6d28d9;}
.gpt-editor-theme .ps{background:#fdfcff;border-bottom:1px solid #e7ddfa;}
.gpt-editor-theme .pl{color:#8162b6;}
.pi{width:100%;background:#f9fafb;border:1px solid var(--b);border-radius:6px;padding:8px 10px;font-size:13px;color:var(--text);font-family:inherit;outline:none;transition:border-color .1s;}
.pi:focus{border-color:var(--blue);background:#fff;}
.psel{width:100%;background:#f9fafb;border:1px solid var(--b);border-radius:6px;padding:8px 10px;font-size:13px;color:var(--text);font-family:inherit;outline:none;cursor:pointer;}
.bitrix-discovery-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
}
.bitrix-discovery-main{
  min-width:0;
}
.pfile{width:100%;padding:18px;border:1.5px dashed var(--bh);border-radius:7px;text-align:center;font-size:12px;color:var(--t3);cursor:pointer;background:#f9fafb;transition:all .1s;}
.pfile:hover{border-color:var(--blue);color:var(--blue);background:#eff6ff;}
.pfile.audio-missing:hover{border-color:#f87171;color:#b91c1c;background:#fff1f2;}
.itag{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:10px;font-size:11px;color:#15803d;margin:2px;cursor:pointer;}
.itag:hover{background:#dcfce7;}
.rrow{display:flex;align-items:center;gap:8px;}
.rv{font-size:13px;font-weight:500;min-width:36px;text-align:right;color:var(--text);}
.pdel{width:100%;padding:8px;border:1px solid #fecaca;background:#fff5f5;color:var(--red);border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;font-family:inherit;transition:all .1s;}
.pdel:hover{background:#fee2e2;}
.pdel-save-webhook{
  border-color:#f1cc72;
  background:#fff8e2;
  color:#b46c00;
}
.pdel-save-webhook:hover{
  background:#fff3cc;
}

.zoom{position:absolute;bottom:16px;left:14px;background:#fff;border:1px solid var(--b);border-radius:7px;display:flex;align-items:center;overflow:hidden;z-index:50;box-shadow:0 1px 4px rgba(0,0,0,.08);}
.zoom-floating{
  top:50%;
  right:34px;
  left:auto;
  bottom:auto;
  transform:translateY(-50%);
  border-radius:18px;
  border:1px solid #dbe4ef;
  box-shadow:0 16px 34px rgba(15,23,42,.10), 0 4px 14px rgba(15,23,42,.05);
  display:flex;
  flex-direction:column;
  padding:8px;
  gap:8px;
  background:rgba(255,255,255,.96);
}
.zb{width:30px;height:30px;display:flex;align-items:center;justify-content:center;font-size:14px;color:var(--t2);cursor:pointer;background:none;border:none;font-family:inherit;transition:background .1s;}
.zoom-floating .zb{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
  color:#516174;
}
.zoom-floating .assistant-toggle{
  width:42px;
  height:42px;
}
.zb:hover{background:#f3f4f6;}
.zoom-floating .zb:hover{background:#f5f8fc;}
.zs{width:1px;height:16px;background:var(--b);}
.zoom-floating .zs{display:none;}
.zv{padding:0 8px;font-size:12px;color:var(--t2);min-width:40px;text-align:center;}
.zoom-floating .zv{
  min-width:42px;
  padding:2px 0 0;
  color:#728095;
  font-size:11px;
}

.ctx{position:fixed;background:#fff;border:1px solid var(--b);border-radius:8px;padding:4px;z-index:1000;min-width:148px;box-shadow:0 6px 20px rgba(0,0,0,.1);display:none;}
.ctx.on{display:block;}
.ci{padding:7px 11px;font-size:13px;color:var(--t2);border-radius:5px;cursor:pointer;display:flex;align-items:center;gap:7px;}
.ci:hover{background:#f3f4f6;color:var(--text);}
.ci.d{color:var(--red);}
.ci.d:hover{background:#fff5f5;}
.csep{height:1px;background:var(--b);margin:3px 0;}
.insert-menu{
  position:fixed;
  min-width:0;
  width:max-content;
  max-width:calc(100vw - 40px);
  background:#fff;
  border:1.5px solid #bcc7d4;
  border-radius:5px;
  box-shadow:0 18px 42px rgba(15,23,42,.10), 0 4px 14px rgba(15,23,42,.05);
  display:none;
  overflow:hidden;
  z-index:1200;
}
.insert-menu.on{display:block;}
.insert-menu-item{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:15px 16px;
  background:#fff;
  border:none;
  border-bottom:2px dashed #d8dde5;
  color:#2563eb;
  font-family:"Inter","SF Pro Text","Helvetica Neue",Arial,sans-serif;
  font-size:13px;
  font-weight:500;
  text-align:left;
  cursor:pointer;
}
.insert-menu-item > span:first-child{
  white-space:nowrap;
}
.insert-menu-item:hover{background:#fbfdff;}
.insert-menu-item.cancel{
  color:#707b8c;
  border-bottom:none;
}
.insert-menu-item.cancel:hover{background:#f8fafc;}
.insert-menu-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:24px;
  margin-left:8px;
  padding:0 8px;
  border-radius:8px;
  background:#2f2f2f;
  color:#fff;
  font-size:11px;
  font-weight:700;
}
.insert-menu-badge.blue{background:#1d73e8;}

.toast{position:fixed;bottom:16px;left:50%;transform:translateX(-50%) translateY(60px);background:#111827;color:#fff;padding:9px 16px;border-radius:7px;font-size:13px;z-index:2000;transition:transform .2s;pointer-events:none;display:flex;align-items:center;gap:12px;box-shadow:0 10px 28px rgba(15,23,42,.22);}
.toast.on{transform:translateX(-50%) translateY(0);}
.toast.has-action{pointer-events:auto;}
.toast-text{white-space:nowrap;}
.toast-action{
  height:28px;
  padding:0 10px;
  border:none;
  border-radius:999px;
  background:#ffffff;
  color:#111827;
  font-size:12px;
  font-weight:700;
  font-family:inherit;
  cursor:pointer;
}
.toast-action:hover{background:#eef2ff;color:#312e81;}

::-webkit-scrollbar{width:4px;}
::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:2px;}

.drawer-overlay{
  position:fixed;inset:0;background:rgba(0,0,0,.3);z-index:400;
  opacity:0;pointer-events:none;transition:opacity .2s;
}
.drawer-overlay.on{opacity:1;pointer-events:all;}
.drawer{
  position:fixed;top:0;right:0;bottom:0;width:480px;max-width:96vw;
  background:#fff;box-shadow:-8px 0 32px rgba(0,0,0,.12);
  display:flex;flex-direction:column;z-index:401;
  transform:translateX(100%);transition:transform .25s cubic-bezier(.4,0,.2,1);
}
.drawer-overlay.on .drawer{transform:translateX(0);}
.drawer-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;border-bottom:1px solid var(--b);flex-shrink:0;
}
.drawer-title{font-size:15px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px;}
.drawer-close{width:28px;height:28px;border:none;background:none;border-radius:6px;
  font-size:16px;color:var(--t2);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.drawer-close:hover{background:#f3f4f6;}
.drawer-section{padding:18px 20px;border-bottom:1px solid var(--b);flex-shrink:0;}
.drawer-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.drawer-section-title{font-size:13px;font-weight:600;color:var(--text);}
.drawer-section-copy{margin-top:3px;font-size:12px;color:var(--t3);line-height:1.5;}
.drawer-add{padding:0;flex-shrink:0;display:flex;gap:8px;}
.drawer-add .minput{flex:1;}
.drawer-list{flex:1;overflow-y:auto;}
.source-card{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:14px;
  padding:16px;
  border:1px solid var(--b);
  border-radius:24px;
  background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);
}
.source-card-spaced{margin-top:12px;}
.source-card-main{
  display:grid;
  grid-template-columns:40px minmax(0,1fr);
  align-items:center;
  gap:12px;
  min-width:0;
}
.source-card-icon{
  width:40px;height:40px;border-radius:999px;flex-shrink:0;
  background:#eef4ff;color:#2563eb;font-size:15px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
}
.source-card-icon.file{
  background:#ecfeff;
  color:#0f766e;
}
.source-card-meta{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.source-card-title{
  font-size:14px;
  font-weight:700;
  color:var(--text);
  line-height:1.25;
}
.source-card-copy{
  margin-top:0;
  font-size:12px;
  color:var(--t3);
  line-height:1.45;
  word-break:break-word;
}
.source-card-side{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-shrink:0;
}
.source-card-side .badge{
  max-width:100%;
  white-space:nowrap;
}
.source-card-side .mbtn{
  min-width:112px;
  justify-content:center;
}
.source-config{
  margin-top:12px;padding:14px;border:1px solid #dbe3f0;border-radius:24px;
  background:#fbfdff;display:none;
}
.source-config.on{display:block;}
.source-note{margin-top:2px;font-size:11px;color:var(--t3);line-height:1.5;}
.source-actions{display:flex;gap:8px;margin-top:12px;}
.source-detected-meta{
  display:none;
  margin-top:12px;
  padding:10px 12px;
  border-radius:20px;
  background:#f8fafc;
  border:1px solid #e5e7eb;
  font-size:11px;
  color:#64748b;
  line-height:1.55;
}
.source-detected-meta.on{display:block;}
.source-detected-meta strong{color:#334155;}
.source-preview{
  margin-top:12px;border:1px solid var(--b);border-radius:20px;background:#fff;
  overflow:hidden;
}
.source-preview-empty{
  padding:18px 16px;font-size:12px;color:var(--t3);line-height:1.5;text-align:center;
}
.source-preview-head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:11px 14px;border-bottom:1px solid #eef2f7;background:#f8fafc;
}
.source-preview-head.invalid{background:#fff7f7;}
.source-preview-title{font-size:12px;font-weight:600;color:var(--text);}
.source-preview-sub{font-size:11px;color:var(--t3);}
.source-preview-list{padding:8px 0;}
.source-preview-list.invalid{border-top:1px solid #fee2e2;}
.source-preview-row{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:9px 14px;border-top:1px solid #f3f4f6;
}
.source-preview-row:first-child{border-top:none;}
.source-preview-row.invalid{background:#fffdfd;}
.source-preview-phone{font-size:12px;font-weight:600;color:var(--text);}
.source-preview-phone.invalid{color:#dc2626;}
.source-preview-name{font-size:11px;color:var(--t3);margin-top:2px;}
.source-preview-tag{
  display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;
  background:#eef4ff;border:1px solid #dbeafe;color:#2563eb;font-size:10px;font-weight:600;
}
.source-preview-tag.invalid{
  background:#fff5f5;
  border-color:#fecaca;
  color:#dc2626;
}
.gs-writeback-section{
  border-top:1px solid #f1f5f9;
  margin-top:4px;
  padding-top:14px;
}
.gs-script-template-wrap{
  margin-top:8px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  overflow:hidden;
}
.gs-script-template-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:8px 12px;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
  font-size:12px;font-weight:600;color:var(--text);
}
.gs-script-code{
  font-family:monospace;font-size:11px;line-height:1.55;
  padding:12px;margin:0;
  background:#0f172a;color:#e2e8f0;
  overflow-x:auto;white-space:pre;
}
.contact-row{
  display:flex;align-items:center;gap:12px;
  padding:10px 20px;border-bottom:1px solid #f3f4f6;
  transition:background .1s;
}
.contact-row:hover{background:#fafafa;}
.contact-avatar{
  width:34px;height:34px;border-radius:50%;
  background:linear-gradient(135deg,#3b82f6,#8b5cf6);
  display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:600;color:#fff;flex-shrink:0;
}
.contact-info{flex:1;min-width:0;}
.contact-name{font-size:13px;font-weight:500;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.contact-meta{display:flex;align-items:center;gap:6px;margin-top:3px;}
.contact-phone{font-size:12px;color:var(--t3);font-family:monospace;}
.contact-source{
  display:inline-flex;align-items:center;padding:2px 6px;border-radius:999px;
  background:#eff6ff;border:1px solid #bfdbfe;color:#2563eb;font-size:10px;font-weight:600;
}
.contact-call{
  height:28px;padding:0 12px;border-radius:6px;border:1px solid var(--b);
  background:#fff;font-size:12px;font-weight:500;color:var(--blue);
  cursor:pointer;font-family:inherit;transition:all .1s;flex-shrink:0;
  display:flex;align-items:center;gap:5px;
}
.contact-call:hover{background:#eff6ff;border-color:var(--blue);}
.contact-del{
  width:26px;height:26px;border:none;background:none;border-radius:5px;
  color:var(--t3);cursor:pointer;font-size:14px;display:flex;
  align-items:center;justify-content:center;flex-shrink:0;transition:all .1s;
}
.contact-del:hover{background:#fff5f5;color:var(--red);}
.drawer-empty{
  flex:1;display:flex;flex-direction:column;align-items:center;
  justify-content:center;color:var(--t3);font-size:13px;gap:8px;padding:40px;text-align:center;
}
.contact-count-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 20px 4px;
}
.contact-count{
  font-size:11px;
  color:var(--t3);
  padding:0;
}
.contact-clear-all-btn{
  flex-shrink:0;
}

.run-modal{width:400px;}
.reports-layout{display:grid;grid-template-columns:minmax(280px,320px) minmax(0,1fr);min-height:0;flex:1;}
.reports-list{min-width:0;border-right:1px solid var(--b);overflow:auto;background:#fbfcfe;}
.reports-detail{min-width:0;overflow:auto;padding:18px 20px 22px;}
.reports-empty{height:100%;display:flex;align-items:center;justify-content:center;color:var(--t3);font-size:13px;text-align:center;padding:24px;}
.reports-empty-inline{height:auto;min-height:140px;}
.reports-list-head{position:sticky;top:0;z-index:2;display:flex;align-items:baseline;justify-content:space-between;padding:10px 14px 9px;background:rgba(251,252,254,.96);backdrop-filter:blur(8px);border-bottom:1px solid #eef2f7;}
.reports-list-scenario{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70%;}
.reports-list-count{font-size:11px;color:#94a3b8;flex-shrink:0;}
.report-row{padding:14px 16px;border-bottom:1px solid #eef2f7;cursor:pointer;transition:background .1s;}
.report-row:hover{background:#f8fafc;}
.report-row.active{background:#eff6ff;}
.report-hangup-btn{height:28px;padding:0 10px;font-size:12px;line-height:1;border-color:#fecaca;color:#b91c1c;background:#fff;}
.report-hangup-btn:hover{background:#fff1f2;color:#991b1b;}
.report-phone{font-size:13px;font-weight:600;color:var(--text);}
.report-meta{margin-top:4px;font-size:11px;color:var(--t3);display:flex;gap:8px;flex-wrap:wrap;}
.report-status{display:inline-flex;align-items:center;padding:2px 7px;border-radius:999px;font-size:10px;font-weight:700;border:1px solid #d1d5db;background:#f9fafb;color:#475569;}
.report-status.ok{background:#f0fdf4;border-color:#bbf7d0;color:#15803d;}
.report-status.bad{background:#fff5f5;border-color:#fecaca;color:#dc2626;}
.report-status.warn{background:#fffbeb;border-color:#fde68a;color:#b45309;}
.report-section{margin-bottom:18px;}
.report-section:last-child{margin-bottom:0;}
.report-actions{display:flex;justify-content:flex-end;margin:-4px 0 12px;}
.report-hangup-detail-btn{border-color:#fecaca;color:#b91c1c;background:#fff;}
.report-hangup-detail-btn:hover{background:#fff1f2;color:#991b1b;}
.report-title{font-size:12px;font-weight:700;color:#334155;text-transform:uppercase;letter-spacing:.05em;margin-bottom:8px;}
.report-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:10px;}
.report-card{padding:12px 13px;border:1px solid #e5e7eb;border-radius:20px;background:#fff;}
.report-card-label{font-size:11px;color:var(--t3);margin-bottom:4px;}
.report-card-value{font-size:13px;font-weight:600;color:var(--text);word-break:normal;overflow-wrap:anywhere;line-height:1.4;}
.report-card-meta{margin-top:6px;font-size:11px;line-height:1.45;color:#64748b;}
.report-card-robot{border-color:#e2e8f0;background:#fcfdff;}
.report-card-robot.success{border-color:#fed7aa;background:#fffaf0;}
.report-card-duplicate{border-color:#fde68a;background:#fffbeb;}
.billing-modal-body{display:flex;flex-direction:column;gap:16px;overflow:auto;}
.billing-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px;}
.billing-topup-row{display:flex;gap:10px;align-items:center;}
.billing-topup-row .minput{flex:1;}
.billing-ops-list{display:flex;flex-direction:column;gap:10px;}
.billing-op-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;padding:14px 16px;border:1px solid #e5e7eb;border-radius:20px;background:#fff;}
.billing-op-main{min-width:0;}
.billing-op-title{font-size:13px;font-weight:600;color:#0f172a;}
.billing-op-meta{margin-top:4px;font-size:11px;color:#64748b;line-height:1.5;}
.billing-op-side{text-align:right;align-self:center;}
.billing-op-rub{font-size:13px;font-weight:700;}
.billing-op-rub.debit{color:#dc2626;}
.billing-op-rub.topup{color:#15803d;}
.billing-op-usd{margin-top:4px;font-size:11px;color:#64748b;}
.billing-empty{padding:22px 18px;border:1px dashed #d7dee8;border-radius:20px;color:#64748b;text-align:center;font-size:12px;line-height:1.55;}
.report-player{width:100%;margin-top:8px;}
.report-transcript,.report-path{display:flex;flex-direction:column;gap:8px;}
.report-bubble{padding:10px 12px;border-radius:24px;border:1px solid #e5e7eb;background:#fff;}
.report-bubble.assistant{background:#f8fafc;}
.report-bubble.user{background:#eff6ff;border-color:#bfdbfe;}
.report-bubble.robot-guard{background:#fff8ec;border-color:#f7d7a8;}
.report-bubble.system{background:#fff7ed;border-color:#fed7aa;}
.report-bubble.unmatched{background:#fff5f5;border-color:#fecaca;}
.report-bubble-title{font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.05em;margin-bottom:4px;}
.report-bubble-text{font-size:13px;color:var(--text);line-height:1.5;white-space:pre-wrap;}
.report-bubble-meta{margin-top:6px;font-size:11px;color:#64748b;line-height:1.45;}
.report-path-row{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border-radius:20px;background:#f8fafc;border:1px solid #e5e7eb;}
.report-path-type{font-size:10px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.05em;min-width:74px;padding-top:2px;}
.report-path-text{font-size:13px;color:var(--text);line-height:1.45;}
.report-path-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1;}
.report-path-meta{font-size:11px;color:#64748b;line-height:1.45;}
.report-event-row .report-path-type{min-width:108px;}
.listen-warning{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #fed7aa;
  background:#fff7ed;
  color:#9a3412;
  font-size:12px;
  line-height:1.5;
}
.run-contact-row{
  display:flex;align-items:center;gap:10px;padding:8px 0;
  border-bottom:1px solid #f3f4f6;
}
.run-contact-row:last-child{border-bottom:none;}
.run-phone{font-size:13px;font-family:monospace;color:var(--text);flex:1;}
.run-name{font-size:12px;color:var(--t3);}
.badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;
  border-radius:10px;font-size:11px;font-weight:500;}
.badge.green{background:#f0fdf4;color:#15803d;border:1px solid #bbf7d0;}
.badge.red{background:#fff5f5;color:#dc2626;border:1px solid #fecaca;}
.badge.blue{background:#eff6ff;color:#2563eb;border:1px solid #bfdbfe;}

.modal-overlay{
  position:fixed;inset:0;background:rgba(15,23,42,.18);z-index:500;
  display:flex;align-items:stretch;justify-content:flex-start;
  opacity:0;pointer-events:none;transition:opacity .2s;
}
.modal-overlay.on{opacity:1;pointer-events:all;}
.scenario-drawer-overlay{
  justify-content:flex-end;
  background:rgba(15,23,42,.14);
}
.scenario-drawer-modal{
  width:min(520px, 92vw)!important;
  max-width:92vw;
  height:100%;
  border-radius:0;
  display:flex;
  flex-direction:column;
  margin-left:auto;
  transform:translateX(100%);
  box-shadow:-18px 0 42px rgba(15,23,42,.12);
}
.scenario-drawer-overlay.on .scenario-drawer-modal{
  transform:translateX(0);
}
.scenario-drawer-modal .modal-body{
  flex:1;
  overflow:auto;
  padding:22px 22px 16px;
}
.scenario-drawer-modal .modal-head{
  padding:18px 22px 16px;
}
.scenario-drawer-modal .modal-foot{
  flex-shrink:0;
  padding:16px 22px;
  background:#fff;
}
.modal{
  background:#fff;border-radius:28px;width:440px;max-width:94vw;
  box-shadow:0 16px 48px rgba(0,0,0,.18);overflow:hidden;
  transform:translateY(12px);transition:transform .2s;
}
.telephony-modal{width:min(980px,92vw)!important;}
.modal.reports-modal{
  width:min(1120px,96vw);
  max-width:96vw;
  height:min(78vh,820px);
  display:flex;
  flex-direction:column;
}
.modal.billing-modal{
  width:min(900px,94vw);
  max-width:94vw;
  height:min(78vh,820px);
  display:flex;
  flex-direction:column;
}
.modal-overlay.on .modal{transform:translateY(0);}
.modal-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px 14px;border-bottom:1px solid var(--b);
}
.modal-title{font-size:15px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:8px;}
.modal-close{width:28px;height:28px;border:none;background:none;border-radius:6px;
  font-size:16px;color:var(--t2);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.modal-close:hover{background:#f3f4f6;}
.modal-body{padding:18px 20px;}
.telephony-modal-body{padding:0!important;}
.telephony-modal-layout{display:grid;grid-template-columns:260px minmax(0,1fr);min-height:480px;}
.telephony-modal-list{border-right:1px solid var(--b);padding:16px;background:#fbfcfe;display:flex;flex-direction:column;gap:8px;overflow-y:auto;}
.telephony-modal-form{padding:18px 18px 8px;overflow-y:auto;}
.telephony-provider-row{
  border:1px solid #dbe2ea;border-radius:12px;background:#fff;padding:11px 12px;cursor:pointer;
  transition:border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
.telephony-provider-row:hover{border-color:#bfdbfe;background:#f8fbff;}
.telephony-provider-row.active{border-color:#93c5fd;box-shadow:0 0 0 2px rgba(59,130,246,.08);}
.telephony-provider-name{font-size:13px;font-weight:700;color:#0f172a;}
.telephony-provider-copy{margin-top:4px;font-size:11px;color:#64748b;line-height:1.45;}
.telephony-provider-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;}
.telephony-provider-actions{display:flex;gap:8px;margin-top:10px;}
.telephony-provider-add{
  height:34px;border-radius:10px;border:1px dashed #bfdbfe;background:#eff6ff;color:#2563eb;
  font-size:12px;font-weight:700;cursor:pointer;font-family:inherit;
}
.telephony-modal-note{font-size:12px;color:#6b7280;line-height:1.5;margin-top:14px;}
.contacts-editor-shell{display:flex;flex-direction:column;gap:14px;}
.contacts-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.contacts-grid-manual{
  display:grid;
  grid-template-columns:1.15fr 1fr auto;
  gap:8px;
}
.contacts-actions-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.contacts-full-btn{
  width:100%;
  justify-content:center;
}
.contacts-list-panel{
  display:flex;
  flex-direction:column;
  gap:0;
}
.source-card-panel{
  margin-top:10px;
}
.contacts-editor-shell .sidebar-section-copy{
  max-width:320px;
  line-height:1.5;
}
.contacts-editor-shell .contacts-grid-manual{
  grid-template-columns:minmax(0,1fr);
}
.contacts-editor-shell .contacts-grid-manual .mbtn{
  width:100%;
}
.telephony-editor-shell{display:flex;flex-direction:column;gap:14px;}
.telephony-provider-strip{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-bottom:2px;
}
.telephony-provider-strip-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.telephony-provider-strip-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.telephony-grid-2{
  display:grid;
  grid-template-columns:1fr 118px;
  gap:10px;
}
.telephony-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.telephony-toggle-row .pl{
  margin:0;
}
.telephony-editor-note{
  margin-top:-2px;
}
.panel-footer-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 0 2px;
}
.panel-footer-buttons{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.mrow{margin-bottom:14px;}
.mrow:last-child{margin-bottom:0;}
.mlabel{font-size:11px;font-weight:600;color:var(--t3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;}
.mlabel span{color:var(--red);}
.minput{width:100%;background:#f9fafb;border:1px solid var(--b);border-radius:7px;
  padding:9px 11px;font-size:13px;color:var(--text);font-family:inherit;
  outline:none;transition:border-color .1s;}
.minput:focus{border-color:var(--blue);background:#fff;}
.mrow-2{display:grid;grid-template-columns:1fr 120px;gap:10px;}
.mtoggle{display:flex;align-items:center;justify-content:space-between;
  background:#f9fafb;border:1px solid var(--b);border-radius:7px;padding:9px 11px;}
.mtoggle-label{font-size:13px;color:var(--text);}
.switch{position:relative;width:36px;height:20px;flex-shrink:0;}
.switch input{opacity:0;width:0;height:0;}
.slider{position:absolute;inset:0;background:#d1d5db;border-radius:20px;
  cursor:pointer;transition:background .2s;}
.slider::before{content:'';position:absolute;width:14px;height:14px;
  left:3px;top:3px;background:#fff;border-radius:50%;transition:transform .2s;}
.switch input:checked+.slider{background:var(--green);}
.switch input:checked+.slider::before{transform:translateX(16px);}
.modal-foot{padding:14px 20px;border-top:1px solid var(--b);display:flex;
  align-items:center;justify-content:space-between;gap:10px;background:#fafafa;}
.mstatus{font-size:12px;color:var(--t3);display:flex;align-items:center;gap:5px;}
.mstatus-dot{width:7px;height:7px;border-radius:50%;background:#d1d5db;}
.mstatus-dot.ok{background:var(--green);}
.mbtn{height:34px;padding:0 16px;border-radius:7px;font-size:13px;font-weight:500;
  border:1px solid var(--b);background:#fff;color:var(--t2);cursor:pointer;
  font-family:inherit;transition:all .1s;}
.mbtn:hover{background:#f3f4f6;}
.mbtn.p{background:var(--blue);color:#fff;border-color:var(--blue);}
.mbtn.p:hover{background:#2563eb;}
.builder-topbar-btn{
  border-color:#e9d5ff;
  background:#faf5ff;
  color:#7c3aed;
}
.builder-topbar-btn:hover{
  background:#f3e8ff;
  color:#6d28d9;
}
.builder-topbar-btn .builder-topbar-mark{
  width:13px;
  height:13px;
}
.modal.builder-modal{
  width:min(820px,92vw);
  max-width:92vw;
  height:min(86vh,920px);
  display:flex;
  flex-direction:column;
}
.builder-modal-title{
  gap:10px;
}
.builder-modal-body{
  display:flex;
  flex-direction:column;
  gap:14px;
  overflow:auto;
}
.builder-hero{
  padding:16px 18px;
  border:1px solid #ece7ff;
  border-radius:20px;
  background:linear-gradient(135deg, #fbf7ff 0%, #f7f8ff 100%);
}
.builder-hero-title{
  font-size:18px;
  color:#5b21b6;
  font-weight:700!important;
}
.builder-hero-copy{
  margin-top:6px;
  font-size:13px;
  line-height:1.55;
  color:#64748b;
}
.builder-chat-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:300px;
  max-height:48vh;
  overflow:auto;
  padding-right:4px;
}
.builder-msg{
  display:flex;
}
.builder-msg.user{
  justify-content:flex-end;
}
.builder-msg-bubble{
  max-width:min(78%, 620px);
  padding:12px 14px;
  border-radius:18px;
  background:#fff;
  border:1px solid #e2e8f0;
  color:#334155;
  font-size:14px;
  line-height:1.55;
}
.builder-msg.assistant .builder-msg-bubble{
  background:#faf5ff;
  border-color:#eadcff;
}
.builder-draft-card{
  padding:16px 18px;
  border:1px solid #dbe7f5;
  border-radius:22px;
  background:#fff;
}
.builder-draft-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.builder-draft-title{
  font-size:18px;
  color:#0f172a;
  font-weight:700!important;
}
.builder-draft-copy{
  margin-top:6px;
  font-size:13px;
  line-height:1.55;
  color:#64748b;
}
.builder-draft-recommendations{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
.builder-chip{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  color:#475569;
  font-size:12px;
}
.builder-draft-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:16px;
}
.builder-draft-actions[hidden]{display:none!important;}
.builder-modal-foot{
  justify-content:stretch;
}
.builder-compose{
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.builder-input{
  width:100%;
  min-height:96px;
  resize:vertical;
  border:1px solid #dbe3ee;
  border-radius:18px;
  padding:14px 16px;
  font:inherit;
  color:#0f172a;
  background:#fff;
  line-height:1.5;
}
.builder-input:focus{
  outline:none;
  border-color:#a855f7;
  box-shadow:0 0 0 3px rgba(168,85,247,.12);
}
.builder-compose-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
}
.builder-thinking-bubble{
  display:flex;
  align-items:center;
  gap:10px;
}
.builder-thinking-copy{
  color:#5b21b6;
  font-weight:600!important;
}
.builder-thinking-dots{
  display:inline-flex;
  align-items:center;
  gap:5px;
}
.builder-thinking-dots i{
  width:8px;
  height:8px;
  border-radius:50%;
  background:linear-gradient(135deg,#7c3aed 0%,#a855f7 100%);
  opacity:.28;
  animation:builder-thinking-dot 1.2s ease-in-out infinite;
}
.builder-thinking-dots i:nth-child(2){animation-delay:.18s;}
.builder-thinking-dots i:nth-child(3){animation-delay:.36s;}
@keyframes builder-thinking-dot{
  0%, 80%, 100%{transform:translateY(0);opacity:.28;}
  40%{transform:translateY(-4px);opacity:1;}
}
.builder-creation-overlay{
  position:fixed;
  inset:0;
  z-index:260;
  display:flex;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 20% 20%, rgba(168,85,247,.18) 0, rgba(168,85,247,0) 28%),
    radial-gradient(circle at 80% 22%, rgba(59,130,246,.12) 0, rgba(59,130,246,0) 26%),
    rgba(248,250,252,.88);
  backdrop-filter:blur(8px);
}
.builder-creation-overlay[hidden]{display:none;}
.builder-creation-card{
  width:min(420px, calc(100vw - 40px));
  padding:30px 28px 26px;
  border-radius:28px;
  background:#fff;
  border:1px solid #ece7ff;
  box-shadow:0 24px 80px rgba(91,33,182,.12);
  text-align:center;
}
.builder-creation-orb{
  width:88px;
  height:98px;
  margin:0 auto 18px;
  border-radius:44% 44% 48% 48% / 36% 36% 58% 58%;
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.92) 0, rgba(255,255,255,.92) 16%, rgba(255,255,255,0) 33%),
    radial-gradient(circle at 68% 70%, rgba(117,58,255,.45) 0, rgba(117,58,255,0) 44%),
    linear-gradient(135deg, #6d28d9 0%, #8b5cf6 48%, #a855f7 100%);
  box-shadow:inset 0 2px 4px rgba(255,255,255,.5), inset 0 -6px 18px rgba(91,33,182,.18), 0 12px 26px rgba(124,58,237,.22);
  animation:builder-orb-float 2.8s ease-in-out infinite;
}
.builder-creation-title{
  font-size:24px;
  line-height:1.15;
  color:#111827;
  font-weight:700!important;
}
.builder-creation-copy{
  margin-top:10px;
  color:#64748b;
  font-size:14px;
  line-height:1.55;
}
.builder-creation-track{
  margin-top:20px;
  height:10px;
  border-radius:999px;
  background:#eef2ff;
  overflow:hidden;
}
.builder-creation-track span{
  display:block;
  width:42%;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#6d28d9 0%,#8b5cf6 50%,#c084fc 100%);
  animation:builder-track-slide 1.35s ease-in-out infinite;
}
@keyframes builder-orb-float{
  0%,100%{transform:translateY(0) scale(1);}
  50%{transform:translateY(-8px) scale(1.03);}
}
@keyframes builder-track-slide{
  0%{transform:translateX(-115%);}
  100%{transform:translateX(310%);}
}

@media (max-width: 980px){
  :root{
    --sidebar-w: 214px;
  }
  .topbar{
    padding:0;
  }
  .topbar-brand{
    min-width:220px;
    width:220px;
    padding:0 14px;
  }
  .topbar-alice-badge{
    padding:3px 8px 3px 6px;
  }
  .topbar-alice-text{
    font-size:10px;
  }
  .topbar-crumbs{
    display:none;
  }
  .modal.reports-modal{height:min(86vh,920px);}
  .modal.billing-modal{height:min(86vh,920px);}
  .reports-layout{grid-template-columns:1fr;}
  .reports-list{max-height:240px;border-right:none;border-bottom:1px solid var(--b);}
  .reports-detail{padding:16px;}
  .report-grid{grid-template-columns:1fr;}
  .billing-summary-grid{grid-template-columns:1fr 1fr;}
  .billing-topup-row{flex-direction:column;align-items:stretch;}
  .telephony-modal-layout{grid-template-columns:1fr;}
  .telephony-modal-list{border-right:none;border-bottom:1px solid var(--b);}
  .mid-panel.open{
    width:var(--builder-side-panel-w-compact);
  }
  .intent-detail-panel{
    left:calc(var(--sidebar-w) + 308px);
  }
  .intent-detail-panel.open{
    width:var(--builder-side-panel-w-compact);
  }
  .idp-add-phrase-btn{
    align-self:stretch;
    width:100%;
  }
  .idp-footer{
    flex-wrap:wrap;
  }
  .idp-footer .audio-tts-btn{
    width:100%;
  }
  .idp-footer-spacer{
    display:none;
  }
}

/* ── AUDIO SIDEBAR ── */
.audio-mode-copy{
  margin-top:6px;
  font-size:12px;
  line-height:1.5;
  color:#738196;
}
.audio-section-divider{
  height:1px;
  margin:4px 16px 12px;
  background:#dbe5f2;
}
.audio-method-list{
  padding:0 20px 6px;
  --audio-method-min-height:auto;
  --audio-method-margin-top:8px;
  --audio-method-padding:9px 12px;
  --audio-method-border:#d6dbe5;
  --audio-method-radius:16px;
  --audio-method-color:#4b5563;
  --audio-method-hover-border:#bfc8d8;
  --audio-method-hover-bg:#fbfcff;
  --audio-method-hover-color:var(--audio-method-color);
  --audio-method-icon-size:24px;
  --audio-method-icon-radius:8px;
  --audio-method-icon-bg:transparent;
  --audio-method-icon-color:#6b7280;
  --audio-method-icon-svg-size:18px;
  --audio-method-title-size:12px;
  --audio-method-title-color:#202733;
  --audio-method-sub-size:10px;
  --audio-method-sub-color:#7b8595;
  --audio-method-sub-margin:2px;
  --audio-method-sub-opacity:1;
}
.audio-method-divider{
  height:1px;
  margin:8px 20px 8px;
  background:#dbe5f2;
}
.audio-method-expanded{
  padding:0 20px 0;
}
.audio-method-card{
  width:100%;
  min-height:var(--audio-method-min-height);
  display:flex;
  align-items:center;
  gap:10px;
  padding:var(--audio-method-padding);
  margin-top:var(--audio-method-margin-top);
  border:2px dashed var(--audio-method-border);
  border-radius:var(--audio-method-radius);
  background:#fff;
  color:var(--audio-method-color);
  cursor:pointer;
  text-align:left;
  transition:border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.audio-method-card:hover{
  border-color:var(--audio-method-hover-border);
  background:var(--audio-method-hover-bg);
  color:var(--audio-method-hover-color);
}
.audio-method-card.active{
  border-color:#9bb9f6;
  background:#f7faff;
}
.audio-method-icon{
  width:var(--audio-method-icon-size);
  height:var(--audio-method-icon-size);
  border-radius:var(--audio-method-icon-radius);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--audio-method-icon-color);
  background:var(--audio-method-icon-bg);
  flex-shrink:0;
}
.audio-method-icon svg{
  width:var(--audio-method-icon-svg-size);
  height:var(--audio-method-icon-svg-size);
  display:block;
}
.audio-method-copy{
  min-width:0;
}
.audio-method-title{
  font-size:var(--audio-method-title-size);
  color:var(--audio-method-title-color);
  line-height:1.2;
}
.audio-method-sub{
  margin-top:var(--audio-method-sub-margin);
  font-size:var(--audio-method-sub-size);
  line-height:1.3;
  color:var(--audio-method-sub-color);
  opacity:var(--audio-method-sub-opacity);
}
.audio-picker-panel{display:none;}
.audio-picker-panel.active{display:block;}
.audio-section-block{
  padding:12px 0 10px;
}
.audio-intro-block{
  background:rgba(107,170,255,.10);
  border-top:1px solid rgba(107,170,255,.10);
}
.audio-section-title{
  font-size:15px;
  color:#1f2937;
  line-height:1.3;
}
.audio-section-copy{
  margin-top:6px;
  font-size:12px;
  line-height:1.5;
  color:#738196;
}
.audio-file-list{max-height:420px;overflow-y:auto;margin:0;}
.audio-file-row{
  display:flex;align-items:center;gap:10px;
  padding:9px 16px;border-bottom:1px solid #f3f4f6;
  cursor:pointer;transition:background .1s;
}
.audio-file-row:hover{background:#f0f9ff;}
.audio-file-row:last-child{border-bottom:none;}
.audio-file-icon{font-size:18px;flex-shrink:0;}
.audio-file-info{flex:1;min-width:0;}
.audio-file-name{font-size:13px;font-weight:500;color:var(--text);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.audio-file-meta{font-size:11px;color:var(--t3);}
.audio-file-del{width:26px;height:26px;border:none;background:none;border-radius:5px;
  color:var(--t3);cursor:pointer;font-size:14px;display:flex;
  align-items:center;justify-content:center;flex-shrink:0;transition:all .1s;}
.audio-file-del:hover{background:#fff5f5;color:var(--red);}
.audio-file-play{
  height:28px;
  border:none;
  border-radius:8px;
  background:#eef4ff;
  color:#2563eb;
  font-size:12px;
  font-weight:600;
  font-family:inherit;
  cursor:pointer;
  padding:0 10px;
  flex-shrink:0;
}
.audio-file-play:hover{background:#dbeafe;}
.audio-empty{padding:32px;text-align:center;color:var(--t3);font-size:13px;}
.audio-tts-box{
  margin:0 0 0;
  padding:14px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#fbfcff;
}
.audio-panel-divider{
  height:1px;
  margin:8px 0 10px;
  background:#dbe4f2;
}
#audio-panel-tts .audio-tts-box{
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
}
.audio-tts-title{
  font-size:12px;
  font-weight:700;
  color:#111827;
  margin-bottom:10px;
}
.audio-tts-text,
.audio-tts-name,
.audio-tts-select{
  width:100%;
  border:none;
  border-radius:0;
  background:transparent;
  color:#111827;
  font-size:13px;
  font-family:inherit;
  padding:10px 12px;
  outline:none;
}
.audio-tts-text{
  min-height:88px;
  resize:vertical;
  line-height:1.45;
  padding:0;
}
.audio-tts-text.tts-demo-active{
  color:#94a3b8;
}
.audio-tts-text::placeholder{color:#94a3b8;}
.audio-tts-select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  color-scheme:light;
  background:#f4f8ff;
  border-radius:10px;
  padding:10px 36px 10px 12px;
  cursor:pointer;
  transition:background .12s ease, color .12s ease;
  background-image:
    linear-gradient(45deg, transparent 50%, #8aa1c3 50%),
    linear-gradient(135deg, #8aa1c3 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size:6px 6px, 6px 6px;
  background-repeat:no-repeat;
}
.audio-tts-select:hover{
  background-color:#eaf2ff;
}
.audio-tts-select:focus{
  background-color:#eaf2ff;
}
.audio-tts-select option{
  background:#fff;
  color:#111827;
}
.audio-tts-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:10px;
}
.audio-tts-name{
  margin-top:10px;
}
.audio-tts-btn{
  margin-top:10px;
  width:100%;
  height:38px;
  border:none;
  border-radius:10px;
  background:#2563eb;
  color:#fff;
  font-size:13px;
  font-weight:600;
  font-family:inherit;
  cursor:pointer;
  transition:background .12s ease;
}
.audio-tts-btn:hover{background:#1d4ed8;}
.intent-create-box{
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
}
.intent-create-editor-fields > * + *{
  margin-top:18px;
}
.intent-create-controls{
  margin-top:20px;
}
.intent-create-text{
  min-height:88px;
  padding:0;
}
.intent-create-input{
  min-height:0;
  height:44px;
  line-height:44px;
  resize:none;
}
.intent-create-phrases{
  margin-bottom:2px;
}
.intent-create-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.intent-create-cancel{
  margin-top:12px;
}
.audio-tts-btn.secondary{
  background:#eef4ff;
  color:#2563eb;
}
.audio-tts-btn.secondary:hover{background:#dbeafe;}
.audio-tts-btn.alice-ai-btn{
  background:linear-gradient(135deg,#5b21b6 0%, #7c3aed 55%, #a855f7 100%);
  color:#fff;
  border:1px solid rgba(124,58,237,.34);
  box-shadow:0 8px 18px rgba(124,58,237,.18);
}
.audio-tts-btn.alice-ai-btn:hover{
  background:linear-gradient(135deg,#4c1d95 0%, #6d28d9 55%, #9333ea 100%);
  color:#fff;
}
.audio-tts-btn.alice-ai-btn:disabled{
  background:linear-gradient(135deg,#8f7ac0 0%, #b39adf 100%);
  color:rgba(255,255,255,.82);
  box-shadow:none;
  cursor:default;
  opacity:.86;
}
.audio-tts-actions,
.audio-record-actions{
  display:grid;
  gap:10px;
  margin-top:10px;
}
.audio-tts-actions{
  grid-template-columns:1fr 1fr;
}
.audio-record-actions{
  grid-template-columns:1fr;
  justify-items:center;
}
.audio-record-toggle-wide{
  width:calc(100% - 80px);
}
.audio-record-note{
  margin-top:10px;
  font-size:12px;
  color:#6b7280;
  line-height:1.45;
}
.audio-record-shell{
  background:transparent;
  border-color:transparent;
}
.audio-record-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.audio-record-status{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:#475569;
}
.audio-record-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:#cbd5e1;
  flex-shrink:0;
}
.audio-record-dot.live{
  background:#ef4444;
  animation:audio-record-blink .95s ease-in-out infinite;
}
@keyframes audio-record-blink{
  0%,100%{opacity:1}
  50%{opacity:.28}
}
.audio-record-duration{
  font-size:12px;
  color:#64748b;
}
.audio-record-duration-under{
  margin:-2px 0 12px;
  text-align:center;
  letter-spacing:.08em;
}
.audio-record-meter-shell{
  margin-bottom:12px;
  padding:4px 0 6px;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.audio-record-meter-frame{
  display:grid;
  grid-template-columns:32px minmax(0,1fr) 32px;
  align-items:end;
  column-gap:8px;
}
.audio-record-meter-scale{
  height:74px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  align-items:center;
  padding:2px 0 4px;
  color:#95a6bf;
  font-size:11px;
  line-height:1;
  position:relative;
}
.audio-record-meter-scale::before{
  content:"";
  position:absolute;
  inset:8px auto 10px 50%;
  width:2px;
  transform:translateX(-50%);
  background:
    radial-gradient(circle, rgba(170,196,232,.95) 0 1px, transparent 1.5px) center top/2px 24px repeat-y;
  opacity:.75;
}
.audio-record-meter-scale span{
  position:relative;
  z-index:1;
  padding:0 4px;
  background:transparent;
}
.audio-record-meter{
  height:74px;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:8px;
}
.audio-record-bar{
  flex:1;
  min-width:0;
  max-width:22px;
  height:9px;
  border-radius:3px 3px 0 0;
  background:
    repeating-linear-gradient(
      to top,
      rgba(146,195,255,.92) 0 4px,
      rgba(146,195,255,.92) 4px 5px,
      transparent 5px 8px
    );
  box-shadow:none;
  opacity:.22;
  transition:height .08s linear, opacity .08s linear;
}
.audio-record-meter-labels{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  gap:8px;
  color:#8ea2c0;
  font-size:10px;
  letter-spacing:.06em;
}
.audio-record-meter-labels span{
  flex:1;
  min-width:0;
  text-align:center;
}
.audio-record-shell .audio-tts-name{
  margin-top:0;
  background:#fff;
}
.audio-preview-box{
  margin:12px 20px 0;
  padding:14px;
  border:1px solid #dbe4f2;
  border-radius:12px;
  background:#fff;
}
.audio-preview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.audio-preview-remove{
  width:24px;
  height:24px;
  border:none;
  border-radius:999px;
  background:#eff3f8;
  color:#64748b;
  font-size:18px;
  line-height:1;
  font-family:inherit;
  cursor:pointer;
  flex-shrink:0;
}
.audio-preview-remove:hover{
  background:#e2e8f0;
  color:#334155;
}
.audio-preview-label{
  font-size:12px;
  color:#475569;
  margin-bottom:10px;
}
.audio-preview-player{
  width:100%;
}
.audio-selected-section{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.audio-variant-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.audio-variant-card{
  position:relative;
  min-height:48px;
  height:auto;
  padding:10px 38px 10px 14px;
  justify-content:flex-start;
  text-align:left;
}
.audio-variant-remove{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:22px;
  height:22px;
  border:0;
  border-radius:999px;
  background:rgba(239,68,68,.10);
  color:#ef4444;
  font-size:18px;
  line-height:20px;
  cursor:pointer;
}
.audio-variant-remove:hover{
  background:rgba(239,68,68,.18);
}
.audio-selected-card{
  border:1px solid #dbe4f2;
  border-radius:12px;
  background:#f8fbff;
  padding:12px;
}
.audio-selected-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.audio-selected-name{
  font-size:13px;
  font-weight:700;
  color:#0f172a;
  line-height:1.4;
}
.audio-selected-copy{
  margin-top:4px;
  font-size:12px;
  color:#64748b;
  line-height:1.45;
}
.audio-selected-remove{
  width:28px;
  height:28px;
  border:none;
  border-radius:8px;
  background:#fff;
  color:#ef4444;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  flex-shrink:0;
}
.audio-selected-remove:hover{
  background:#fee2e2;
}
.audio-selected-actions{
  margin-top:10px;
}
.audio-setting-group{
  margin-top:12px;
}
.audio-setting-label{
  display:block;
  margin-bottom:6px;
  font-size:12px;
  font-weight:600;
  color:#334155;
}
.audio-setting-range{
  width:100%;
}

/* Intent ports on canvas node */
.intent-ports{
  margin-top:10px;
  background:linear-gradient(180deg,#f6f8fc 0%,#eef3fb 100%);
  border:1px solid #dbe4f2;
  border-radius:16px;
  padding:12px 10px 10px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.intent-ports-header{
  font-size:11px;
  color:#5f6f86;
  font-weight:700;
  letter-spacing:normal;
  margin-bottom:8px;
  padding:0 2px;
}
.intent-ports-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.intent-port-row{
  display:flex;
  align-items:center;
  min-height:44px;
  background:#fff;
  border-radius:10px;
  position:relative;
  padding:10px 42px 10px 12px;
  border:1px solid transparent;
  transition:border-color .14s ease, box-shadow .14s ease, background .14s ease, transform .14s ease;
  cursor:pointer;
}
.intent-port-row:hover{
  border-color:#93c5fd;
  box-shadow:0 0 0 2px rgba(59,130,246,.10);
  background:#f8fbff;
}
.intent-port-row.active{
  border-color:#60a5fa;
  box-shadow:0 0 0 2px rgba(59,130,246,.14);
  background:#eff6ff;
}
.robot-guard-port-row{
  background:#fffbf5;
  border-color:#fde7cc;
}
.robot-guard-port-row:hover{
  background:#fff9ef;
  border-color:#f8d9ad;
  box-shadow:0 0 0 2px rgba(245,158,11,.08);
}
.intent-port-row.expanded{
  align-items:stretch;
  flex-direction:column;
  gap:6px;
  padding-top:8px;
  padding-bottom:8px;
}
.intent-port-main{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  padding-right:0;
}
.intent-port-main-gpt{
  align-items:flex-start;
  padding-right:168px;
  min-height:66px;
}
.gpt-intent-port-row{
  padding-right:12px;
  min-height:74px;
}
.intent-port-name{
  flex:1;
  font-size:13px;
  color:#1a2233;
  font-weight:500;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  letter-spacing:normal;
  line-height:1.35;
}
.intent-port-dot-wrap{
  position:absolute;
  top:50%;
  right:12px;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  margin-left:0;
}
.intent-port-actions{
  position:absolute;
  top:-8px;
  right:18px;
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:2px;
  padding:2px;
  border:1px solid #d9e3f1;
  border-radius:999px;
  background:#ffffff;
  box-shadow:0 8px 18px rgba(15,23,42,.08);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .16s ease, visibility 0s linear .22s;
}
.intent-port-row:hover .intent-port-actions{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition-delay:0s;
}
.intent-port-action{
  appearance:none;
  width:24px;
  height:24px;
  border:none;
  background:transparent;
  color:#7b8494;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .16s ease, color .16s ease, transform .16s ease;
}
.intent-port-action:hover{
  background:#f3f6fb;
  color:#4b5563;
  transform:translateY(-1px);
}
.intent-port-action:active{
  transform:translateY(0);
}
.intent-port-action:disabled{
  opacity:.34;
  cursor:default;
  transform:none;
}
.intent-port-action.danger:hover{
  background:#fef2f2;
  color:#dc2626;
}
.intent-port-action svg{
  width:16px;
  height:16px;
}
.intent-port-row.expanded .intent-port-dot-wrap{
  right:12px;
}
.intent-port-row.expanded .intent-port-actions{
  right:18px;
}
.intent-gpt-outcomes{
  position:absolute;
  top:50%;
  right:10px;
  transform:translateY(-50%);
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:flex-end;
  width:154px;
  margin-right:0;
  padding-top:0;
}
.intent-gpt-outcome{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  width:100%;
}
.intent-gpt-outcome-text{
  max-width:128px;
  font-size:11px;
  line-height:1.2;
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.intent-gpt-outcome-text.success{
  color:#15803d;
}
.intent-gpt-outcome-text.failure{
  color:#b91c1c;
}
.intent-port-main-gpt .intent-port-name{
  display:block;
  max-width:calc(100% - 166px);
  padding-top:10px;
  white-space:normal;
}
.gpt-intent-port-row .intent-port-actions{
  top:-10px;
  right:14px;
}
.intent-gpt-editor-actions{
  position:static;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:none;
  margin-left:auto;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  gap:4px;
}
.intent-inline-editor{
  width:100%;
  padding-top:0;
  padding-right:20px;
  padding-right:26px;
}
.intent-inline-input{
  margin-bottom:8px;
}
.intent-inline-textarea{
  min-height:74px;
  margin-bottom:8px;
}
.intent-inline-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
  margin-bottom:8px;
}.intent-inline-phrases{
  margin-bottom:8px;
}
.intent-inline-phrase-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 38px;
  gap:6px;
}
.intent-inline-phrase-row .mbtn{
  width:38px;
  height:34px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.intent-inline-empty{
  font-size:11px;
  color:#8b95a7;
}
.intent-inline-section-label{
  margin-top:10px;
  margin-bottom:6px;
  font-size:11px;
  font-weight:600;
  letter-spacing:.02em;
  color:#7b8798;
}
.intent-gpt-outcome-label{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:0;
  margin-bottom:0;
  line-height:1.2;
}
.intent-gpt-label-button{
  border:none;
  background:none;
  padding:0;
  color:#66758b;
  font:inherit;
  cursor:text;
}
.intent-gpt-label-input{
  min-width:120px;
  height:30px;
  padding:0 8px;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#fff;
  color:#334155;
  font:inherit;
  outline:none;
}
.intent-gpt-label-input:focus{
  border-color:#a855f7;
  box-shadow:0 0 0 3px rgba(168,85,247,.12);
}
.intent-gpt-outcome-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  flex-shrink:0;
}
.intent-gpt-outcome-dot.success{
  background:#22c55e;
}
.intent-gpt-outcome-dot.failure{
  background:#ef4444;
}
.intent-gpt-readonly{
  min-height:40px;
  display:flex;
  align-items:center;
  padding:0 12px;
  border:1px solid #dbe2ea;
  border-radius:10px;
  background:#f8fafc;
  color:#475569;
  font-size:13px;
}
.intent-inline-copy{
  margin-top:-2px;
  font-size:12px;
  line-height:1.45;
  color:#64748b;
}
.silence-prompt-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.silence-prompt-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px 34px;
  gap:6px;
  align-items:center;
}
.silence-prompt-main{
  min-width:0;
  height:36px;
  border:1px solid #dbe4f2;
  border-radius:10px;
  background:#fff;
  color:#1f2937;
  font-size:13px;
  font-weight:600;
  text-align:left;
  padding:0 12px;
  cursor:pointer;
}
.silence-prompt-main:hover{
  border-color:#bcd0eb;
  background:#f8fbff;
}
.silence-prompt-name{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.silence-prompt-action{
  width:34px;
  height:34px;
  border:1px solid #dbe4f2;
  border-radius:10px;
  background:#fff;
  color:#64748b;
  cursor:pointer;
}
.silence-prompt-action:hover{
  background:#f8fbff;
  border-color:#bcd0eb;
}
.silence-prompt-action.danger{
  color:#ef4444;
}
.silence-prompt-action.danger:hover{
  background:#fef2f2;
  border-color:#fecaca;
}
.intent-fallback-badge{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:1px 6px;
  border-radius:999px;
  background:#eef4ff;
  border:1px solid #d6e5ff;
  color:#3b6fd8;
  font-size:10px;
  font-weight:600;
  vertical-align:middle;
}
.intent-gpt-failure-badge{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  background:#fff1f2;
  border:1px solid #fecdd3;
  color:#dc2626;
  font-size:10px;
  font-weight:700;
  line-height:1.2;
  vertical-align:middle;
}
.intent-silence-badge{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:1px 6px;
  border-radius:999px;
  background:#fff6dd;
  border:1px solid #fde7ad;
  color:#b7791f;
  font-size:10px;
  font-weight:600;
  vertical-align:middle;
}
.intent-system-badge{
  display:inline-flex;
  align-items:center;
  margin-left:6px;
  padding:1px 6px;
  border-radius:999px;
  background:#f6f7f9;
  border:1px solid #e1e5eb;
  color:#667085;
  font-size:10px;
  font-weight:600;
  vertical-align:middle;
}
.intent-system-badge-robot{
  background:#eef7ff;
  border:1px solid #cfe5ff;
  color:#2f6fd6;
}
.intent-system-badge-ivr{
  background:#f4f0ff;
  border:1px solid #ddd1ff;
  color:#7a4ce0;
}
.intent-system-badge-unavailable{
  background:#fff3e8;
  border:1px solid #ffd8b0;
  color:#c26a1b;
}
.intent-system-badge-busy{
  background:#fff1f2;
  border:1px solid #fecdd3;
  color:#d63c5f;
}
.intent-system-badge-no-answer{
  background:#fef3c7;
  border:1px solid #fde68a;
  color:#b7791f;
}
.intent-system-badge-hangup{
  background:#f3f4f6;
  border:1px solid #d1d5db;
  color:#6b7280;
}

/* ── Start node (ManyChat-style) ── */
.node-start{
  width:255px;
  border:2px solid transparent;
  background:#fff;
  box-shadow:0 8px 22px rgba(22,192,111,.10),0 2px 6px rgba(15,23,42,.06);
}
.node-start.sel{
  border-color:#16c06f !important;
}
.node-listen{width:255px;}
.node-end{min-height:84px;}

/* Header */
.node-start .sn-head{
  display:flex;
  align-items:center;
  gap:10px;
  padding:16px 18px 14px;
  background:linear-gradient(180deg,#e8ff9a 0%, #e4ff95 100%);
  border-radius:26px 26px 0 0;
}
.node-start .sn-icon{width:24px;height:24px;color:#95b700;flex-shrink:0;}
.node-start .sn-title{flex:1;font-size:15px;font-weight:700;color:#1f2937;letter-spacing:normal;line-height:normal;}

/* Body */
.node-start .sn-body{
  padding:18px 18px 56px;
  display:flex;
  flex-direction:column;
  gap:0;
  background:#fff;
  border-radius:0 0 26px 26px;
}
.sn-desc{margin:0 0 14px;font-size:12px;color:#6b7280;line-height:1.5;letter-spacing:normal;}
.sn-new-btn{
  width:100%;min-height:46px;padding:12px 16px;
  border:2px dashed #d4d4d4;border-radius:18px;
  background:#fff;color:#8b8b8b;
  font-family:"Inter","SF Pro Text","Helvetica Neue",Arial,sans-serif;
  font-size:13px;font-weight:500;letter-spacing:normal;
  cursor:pointer;transition:background .15s,border-color .15s;
}
.sn-new-btn:hover{background:#fafcec;border-color:#bddf8f;color:#64725e;}

/* Selected trigger card inside node */
.sn-trigger-card{
  display:flex;align-items:center;gap:10px;
  padding:16px;background:#f5f7fa;
  border:1px solid #e8edf3;border-radius:14px;
  cursor:pointer;margin-bottom:10px;
}
.sn-trigger-card:hover{background:#eef2f6;}
.sn-trigger-ico{font-size:20px;flex-shrink:0;}
.sn-trigger-title{font-size:13px;font-weight:600;color:#111827;line-height:normal;letter-spacing:normal;}
.sn-trigger-sub{font-size:11px;color:#9ca3af;margin-top:2px;line-height:normal;letter-spacing:normal;}
.sn-remove-btn{
  align-self:flex-start;background:none;border:none;
  font-size:12px;color:#9ca3af;cursor:pointer;padding:0;
}
.sn-remove-btn:hover{color:#ef4444;}
.sn-telephony-card{
  background:#f8fafc;
  border:1px solid #e7edf3;
  border-radius:28px;
  padding:12px 13px;
  margin:0 0 10px;
}
.sn-telephony-card.warning{
  background:#fff7ed;
  border-color:#fed7aa;
}
.sn-telephony-head{
  display:flex;align-items:center;gap:7px;margin-bottom:8px;
}
.sn-telephony-dot{
  width:7px;height:7px;border-radius:50%;background:#9ca3af;flex-shrink:0;
}
.sn-telephony-dot.ok{background:#22c55e;}
.sn-telephony-dot.warning{background:#f59e0b;}
.sn-telephony-title{
  font-size:10px;font-weight:700;color:#334155;text-transform:uppercase;letter-spacing:.03em;
}
.sn-telephony-copy{
  font-size:10px;color:#6b7280;line-height:1.45;
}
.sn-telephony-rows{display:flex;flex-direction:column;gap:5px;}
.sn-telephony-row{
  display:flex;justify-content:space-between;gap:10px;font-size:10px;color:#64748b;
}
.sn-telephony-row strong{color:#334155;font-weight:600;text-align:right;}
.sn-telephony-selector{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:10px;
}
.sn-telephony-selector-label{
  font-size:10px;
  font-weight:700;
  color:#475569;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.sn-telephony-select{
  width:100%;
  height:32px;
  border:1px solid #d8e0ec;
  border-radius:20px;
  background:#fff;
  color:#0f172a;
  font-size:12px;
  padding:0 10px;
  font-family:inherit;
}
.sn-telephony-select:focus{
  outline:none;
  border-color:#93c5fd;
  box-shadow:0 0 0 2px rgba(59,130,246,.12);
}
.sn-telephony-active{margin-top:8px;font-size:10px;font-weight:700;color:#15803d;}
.sn-telephony-link{
  margin-top:8px;padding:0;border:none;background:none;color:#2563eb;font-size:10px;font-weight:600;cursor:pointer;
}
.sn-telephony-link:hover{color:#1d4ed8;}
.start-system-port-list{
  margin-top:12px;
  padding:12px;
  border:1px solid #dfead5;
  border-radius:16px;
  background:#fcfef7;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.start-system-port-title{
  font-size:11px;
  font-weight:700;
  color:#64748b;
  text-transform:uppercase;
  letter-spacing:.06em;
}
.start-system-port-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:28px;
  padding:6px 0;
  border-top:1px solid #edf2f8;
}
.start-system-port-row:first-of-type{
  border-top:none;
  padding-top:0;
}
.start-system-port-name{
  font-size:13px;
  font-weight:600;
  color:#334155;
}

/* "Дальше" + dot at bottom-right corner */
.sn-port{
  position:absolute;
  right:-6px;
  bottom:20px;
  display:flex;
  align-items:center;
  gap:6px;
}
.sn-then{
  font-family:"Inter","Helvetica Neue","Segoe UI",Arial,sans-serif;
  font-size:12px;
  font-weight:400;
  letter-spacing:normal;
  color:#6d737c;
  white-space:nowrap;
  line-height:1;
}

/* Panel: trigger options */
.trigger-option-row{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;border-radius:8px;
  border:1px solid #d9dee7;background:#fff;
  cursor:pointer;transition:border-color .15s,background .15s;
}
.trigger-option-row:hover{border-color:var(--blue);background:#f8fbff;}
.trigger-option-row.active{border-color:var(--green);background:#f0fdf4;}
.trigger-option-ico{font-size:18px;flex-shrink:0;}
.trigger-option-title{font-size:13px;font-weight:600;color:var(--text);letter-spacing:normal;line-height:normal;}
.trigger-option-sub{font-size:11px;color:var(--t3);margin-top:1px;letter-spacing:normal;line-height:normal;}
.trigger-option-check{margin-left:auto;font-size:14px;color:var(--green);font-weight:700;flex-shrink:0;}
.trigger-telephony-btn{
  align-self:flex-start;
  height:30px;
  padding:0 12px;
}

/* Intent cards in panel */
.intent-card{
  background:#f9fafb;
  border:1px solid #e7ebf1;
  border-radius:10px;
  padding:10px 12px;
  margin-bottom:8px;
  transition:border-color .14s ease, box-shadow .14s ease, background .14s ease;
  cursor:pointer;
}
.intent-card:hover{
  border-color:#bfdbfe;
  background:#fbfdff;
}
.intent-card.active{
  border-color:#60a5fa;
  background:#eff6ff;
  box-shadow:0 0 0 2px rgba(59,130,246,.12);
}
.intent-card-head{display:flex;gap:6px;align-items:center;margin-bottom:8px;}
.intent-name-input{font-weight:600;color:#7c3aed;}
.intent-name-static{
  margin-bottom:8px;
  font-size:13px;
  font-weight:600;
  color:var(--text);
  letter-spacing:normal;
  line-height:normal;
}
.intent-default-mark{
  display:inline-flex;
  align-items:center;
  padding:2px 7px;
  border-radius:999px;
  background:#eff6ff;
  border:1px solid #bfdbfe;
  color:#2563eb;
  font-size:10px;
  font-weight:700;
}
.intent-silence-mark{
  display:inline-flex;
  align-items:center;
  padding:2px 7px;
  border-radius:999px;
  background:#fef3c7;
  border:1px solid #fde68a;
  color:#b45309;
  font-size:10px;
  font-weight:700;
}
.intent-system-mark{
  display:inline-flex;
  align-items:center;
  padding:2px 7px;
  border-radius:999px;
  background:#f3f4f6;
  border:1px solid #d1d5db;
  color:#4b5563;
  font-size:10px;
  font-weight:700;
}
.intent-fallback-note{
  margin-bottom:8px;
  font-size:12px;
  color:#6b7280;
  line-height:1.45;
}
.intent-system-help{
  font-size:12px;
  color:#6b7280;
  line-height:1.45;
  margin-bottom:10px;
}
.intent-method-panel{
  padding:0;
}
.intent-method-panel-separated{
  padding-top:0;
}
.intent-panel-divider{
  height:1px;
  margin:40px 0;
  background:#dbe5f2;
}
.intent-panel-divider-top{
  margin:40px 0;
}
.intent-method-title{
  font-size:14px;
  color:#111827;
  margin-bottom:6px;
}
.intent-method-copy{
  margin-bottom:14px;
  font-size:12px;
  color:#6b7280;
  line-height:1.5;
}
.intent-system-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.intent-choice-toolbar-cards{
  flex-direction:column;
  flex-wrap:nowrap;
  gap:8px;
}
.intent-current-toolbar{
  gap:0;
  width:100%;
  box-sizing:border-box;
}
.intent-current-shell{
  padding:18px 0 0;
  background:#f5f6f8;
  border-radius:30px;
  overflow:hidden;
}
.activation-shell{
  padding-top:18px;
}
.activation-system-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:8px 20px 4px;
}
.activation-system-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:5px 12px;
  border-radius:20px;
  border:1.5px solid #c7d2e8;
  background:#f0f4ff;
  color:#2D69DA;
  font-size:12px;
  font-weight:500;
  cursor:pointer;
  transition:background 0.15s,border-color 0.15s;
  white-space:nowrap;
}
.activation-system-chip:hover{
  background:#e0e8ff;
  border-color:#2D69DA;
}
.activation-system-row{
  border-color:#c7d2e8;
  background:#f0f4ff;
}
.activation-system-card{
  margin-top:0;
}
.activation-system-card-icon{
  color:inherit;
  background:transparent;
}
.activation-system-intent-row{
  background:#f0f4ff;
  border-radius:10px;
}
.activation-silence-meta{
  font-size:11px;
  color:#6b7280;
  margin-left:6px;
  flex-shrink:0;
}
.activation-next-row{
  padding:8px 12px;
}
.activation-silence-setting{
  padding:12px 16px 4px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.activation-silence-label{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  font-weight:500;
  color:#374151;
}
.activation-silence-input{
  width:80px;
}
.activation-silence-hint{
  font-size:11px;
  color:#9ca3af;
  line-height:1.4;
}
.activation-shell .intent-current-toolbar{
  padding:0 20px 16px;
}
.activation-current-first{
  margin-bottom:20px;
}
.activation-current-minimal{
  background:transparent;
}
.activation-current-minimal .intent-current-toolbar{
  padding:0 20px;
}
.activation-empty-copy{
  padding:18px 4px 10px;
  color:#707070;
  font-size:14px;
  line-height:1.45;
  text-align:left;
  font-weight:400;
}
.activation-current-divider{
  height:1px;
  margin:0 0 20px;
  background:#d9dee7;
}
.activation-option-section{
  padding:0 20px;
  margin-bottom:10px;
}
.activation-section-copy{
  padding:0;
  margin-bottom:10px;
  font-family:Inter, system-ui, sans-serif;
  font-size:9px;
  line-height:1.25;
  font-weight:600;
  letter-spacing:.07em;
  text-transform:uppercase;
  color:#b56b4e;
}
.activation-method-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  --audio-method-min-height:76px;
  --audio-method-margin-top:0;
  --audio-method-border:#d9d9d9;
  --audio-method-radius:22px;
  --audio-method-color:#707070;
  --audio-method-hover-border:#2D69DA;
  --audio-method-hover-bg:#fff;
  --audio-method-hover-color:#2D69DA;
  --audio-method-icon-size:48px;
  --audio-method-icon-radius:0;
  --audio-method-icon-color:inherit;
  --audio-method-icon-svg-size:42px;
  --audio-method-title-size:14px;
  --audio-method-title-color:inherit;
  --audio-method-sub-size:12px;
  --audio-method-sub-color:inherit;
  --audio-method-sub-margin:6px;
  --audio-method-sub-opacity:.95;
}
.activation-method-list .audio-method-card:focus-visible{
  outline:none;
  border-color:#2D69DA;
  color:#2D69DA;
}
.activation-method-list .listen-audio-open-card{
  min-height:38px;
  justify-content:center;
  padding:7px 12px;
}
.activation-method-list .listen-audio-open-card .audio-method-title{
  font-size:14px;
  line-height:1.2;
  color:#2D69DA;
}
.listen-audio-sidebar-list{
  margin-bottom:10px;
}
.listen-audio-sidebar-row{
  --intent-row-grid:minmax(0,1fr) 42px;
}
.listen-audio-sidebar-row .intent-current-row-title{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.listen-audio-sidebar-row.audio-missing{
  --intent-row-color:#ef4444;
  --intent-row-title-color:#ef4444;
  border-color:#fecaca;
}
.activation-method-list .audio-method-card.is-disabled,
.activation-method-list .audio-method-card:disabled{
  opacity:.5;
  cursor:default;
}
.activation-method-list .audio-method-card.is-disabled:hover,
.activation-method-list .audio-method-card:disabled:hover{
  border-color:#d9d9d9;
  color:#707070;
  background:#fff;
}
.activation-sidebar-row{
  --intent-row-grid:minmax(0,1fr) 42px;
  --intent-row-height:28px;
  --intent-row-min-height:28px;
  --intent-row-radius:0;
  --intent-row-color:#2D69DA;
  --intent-row-title-color:#2D69DA;
  --intent-row-title-align:center;
  --intent-row-title-size:13px;
  --intent-row-title-weight:400;
  --intent-row-copy-direction:row;
  --intent-row-copy-align:center;
  --intent-row-copy-justify:center;
  --intent-row-copy-gap:0;
  --intent-row-active-border:#1f8a4c;
  --intent-row-active-bg:#fff;
  --intent-row-active-shadow:none;
  --intent-row-active-title-color:#1f8a4c;
  --intent-row-active-z:1;
  --intent-row-actions-right:-30px;
  --intent-row-hover-border:#2D69DA;
  --intent-row-hover-bg:#fff;
  --intent-row-hover-shadow:none;
}
.activation-sidebar-row-arrow{
  justify-self:stretch;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
  border-left:1px solid #d7dbe1;
  color:#8ab5ff;
}
.activation-sidebar-row-arrow svg{
  width:16px;
  height:16px;
}
.activation-sidebar-row.active .activation-sidebar-row-arrow{
  color:#1f8a4c;
  opacity:1;
}
.activation-system-card-icon .intent-system-sidebar-icon{
  width:36px;
  height:36px;
}
.activation-system-card-icon .intent-system-sidebar-icon svg{
  width:24px;
  height:24px;
}
.intent-method-sidebar-icon-phrase{color:#2D69DA;background:#edf4ff;}
.intent-method-sidebar-icon-gpt{color:#7c3aed;background:#f4efff;}
.intent-method-sidebar-icon-preset{color:#0f9f6e;background:#ecfdf5;}
.intent-system-row-copy{
  flex-direction:row;
  align-items:center;
  gap:10px;
}
.intent-system-sidebar-icon{
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  border-radius:999px;
}
.intent-system-sidebar-icon svg{
  width:18px;
  height:18px;
}
.intent-system-sidebar-icon-fallback{
  color:#3b6fd8;
  background:#eef4ff;
}
.intent-system-sidebar-icon-gpt{
  color:#7a4ce0;
  background:#f4f0ff;
}
.intent-system-sidebar-icon-silence{
  color:#b7791f;
  background:#fff6dd;
}
.intent-system-sidebar-icon-robot{
  color:#2f6fd6;
  background:#eef7ff;
}
.intent-system-sidebar-icon-ivr{
  color:#7a4ce0;
  background:#f4f0ff;
}
.intent-system-sidebar-icon-unavailable{
  color:#c26a1b;
  background:#fff3e8;
}
.intent-system-sidebar-icon-busy{
  color:#d63c5f;
  background:#fff1f2;
}
.intent-system-sidebar-icon-no_answer{
  color:#b7791f;
  background:#fef3c7;
}
.intent-system-sidebar-icon-caller_hangup{
  color:#6b7280;
  background:#f3f4f6;
}
.intent-current-row.system .intent-current-row-copy{
  flex-direction:row;
  align-items:center;
}
.intent-current-row.system .intent-current-row-title{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.intent-gpt-shell{
  margin-top:8px;
  padding:18px 0 0;
  background:#f5f6f8;
  border-radius:30px;
  overflow:hidden;
}
.intent-current-shell .intent-method-title,
.intent-current-shell .intent-method-copy,
.intent-gpt-shell .intent-method-title,
.intent-gpt-shell .intent-method-copy{
  padding-left:20px;
  padding-right:20px;
}
.intent-current-shell .intent-method-copy,
.intent-gpt-shell .intent-method-copy{
  margin-bottom:20px;
}
.intent-current-shell .intent-system-empty{
  padding:18px 20px;
}
.intent-gpt-shell .intent-current-row.gpt .intent-current-row-sub{
  color:#7b8798;
}
.intent-system-shell{
  background:#f5f6f8;
  border-radius:30px 30px 0 0;
}
.intent-system-shell-list{
  gap:0;
}
.intent-system-shell .intent-method-copy{
  margin-bottom:12px;
}
.intent-system-add{
  appearance:none;
  border:1px solid #dbe2ea;
  background:#fff;
  color:#334155;
  border-radius:999px;
  padding:7px 12px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}
.intent-system-add:hover{
  background:#f8fafc;
  border-color:#bfdbfe;
  color:#1d4ed8;
  transform:translateY(-1px);
}
.intent-choice-card,
.intent-system-card{
  appearance:none;
  width:100%;
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  align-items:center;
  gap:0;
  text-align:left;
  min-height:56px;
  padding:0 14px;
  border:1px solid #d8dde6;
  border-radius:0;
  background:#fff;
  color:#374151;
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.intent-system-shell .intent-system-card + .intent-system-card{
  border-top:none;
}
.intent-choice-card:hover,
.intent-system-card:hover{
  border-color:#b9c7df;
  background:#fbfcfe;
  transform:translateY(-1px);
  box-shadow:0 6px 16px rgba(148,163,184,.08);
}
.intent-choice-card:active,
.intent-system-card:active{
  transform:translateY(0);
}
.intent-current-row{
  width:100%;
  height:var(--intent-row-height, 28px);
  min-height:var(--intent-row-min-height, 28px);
  position:relative;
  display:grid;
  grid-template-columns:var(--intent-row-grid, minmax(0,1fr) calc((100% / 7.25) * 2));
  align-items:center;
  border:1px solid #d7dbe1;
  border-radius:var(--intent-row-radius, 0);
  background:var(--intent-row-bg, #fff);
  color:var(--intent-row-color, #1d4ed8);
  text-align:left;
  cursor:pointer;
  transition:border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.intent-current-row + .intent-current-row{
  border-top:none;
}
.intent-current-row:hover{
  border-color:var(--intent-row-hover-border, #b9c7df);
  background:var(--intent-row-hover-bg, #fbfcfe);
  box-shadow:var(--intent-row-hover-shadow, 0 6px 16px rgba(148,163,184,.08));
}
.intent-current-row.active{
  border-color:var(--intent-row-active-border, #90b4ff);
  background:var(--intent-row-active-bg, #f8fbff);
  box-shadow:var(--intent-row-active-shadow, 0 10px 24px rgba(77,119,208,.12));
  z-index:var(--intent-row-active-z, auto);
}
.intent-current-row.active .intent-current-row-title{
  color:var(--intent-row-active-title-color, var(--intent-row-title-color, #2D69DA));
}
.intent-current-row-title{
  min-width:0;
  font-size:var(--intent-row-title-size, 13px);
  line-height:1.15;
  font-weight:var(--intent-row-title-weight, 400);
  color:var(--intent-row-title-color, #2D69DA);
  text-align:var(--intent-row-title-align, left);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.intent-current-row-copy{
  min-width:0;
  display:flex;
  flex-direction:var(--intent-row-copy-direction, column);
  align-items:var(--intent-row-copy-align, stretch);
  justify-content:var(--intent-row-copy-justify, center);
  gap:var(--intent-row-copy-gap, 2px);
  padding:0 12px;
}
.intent-current-row-sub{
  font-size:10px;
  line-height:1.35;
  color:#7b8798;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.intent-current-row.gpt .intent-current-row-title{
  color:#7c3aed;
}
.intent-current-row.gpt .intent-current-row-sub{
  color:#8b5cf6;
}
.intent-current-row-dot{
  justify-self:stretch;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
  border-left:1px solid #d7dbe1;
}
.intent-current-row-dot::before{
  content:"";
  width:14px;
  height:14px;
  border-radius:999px;
  border:2px solid #8a95a8;
  background:#fff;
}
.intent-current-row-dot.connected::before{
  background:#8a95a8;
}
.intent-gpt-box{
  margin-top:10px;
  margin-bottom:24px;
}
.intent-gpt-panel{
  padding:12px 20px 0;
  border-radius:0;
  background:#fff;
  position:relative;
  overflow:hidden;
}
.intent-gpt-panel::before{
  content:none;
}
.intent-gpt-panel .intent-method-title,
.intent-gpt-panel .intent-method-copy{
  position:relative;
  z-index:1;
}
.intent-gpt-panel .intent-method-title{
  color:#111827;
  margin-top:4px;
  margin-bottom:6px;
}
.intent-gpt-panel .intent-method-copy{
  color:#738196;
  margin-bottom:14px;
  max-width:620px;
}
.intent-gpt-panel .intent-gpt-box{
  position:relative;
  z-index:1;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  backdrop-filter:none;
}
.intent-gpt-panel .intent-gpt-readonly{
  border-color:#e6d8ff;
  background:#fbf8ff;
  color:#6b3fd1;
}
.intent-gpt-panel .pi,
.intent-gpt-panel .psel,
.intent-gpt-panel .json-textarea{
  background:#fff;
  border-color:#dbe3ee;
}
.intent-gpt-panel .pi,
.intent-gpt-panel .psel{
  height:52px;
  padding:0 14px;
  border-radius:12px;
  font-size:14px;
}
.intent-gpt-panel .pi:focus,
.intent-gpt-panel .psel:focus,
.intent-gpt-panel .json-textarea:focus{
  border-color:#a855f7;
  box-shadow:0 0 0 3px rgba(168,85,247,.12);
}
.intent-gpt-targets{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.intent-gpt-target-card{
  padding:18px 18px 16px;
  border:1px solid #e6edf7;
  border-radius:18px;
  background:#fff;
  box-shadow:0 1px 0 rgba(15,23,42,.02);
}
.intent-gpt-meta-row{
  margin-bottom:16px;
  grid-template-columns:minmax(0,1fr);
}
.intent-gpt-target-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}
.intent-gpt-target-remove{
  width:28px;
  height:28px;
  border:none;
  background:none;
  color:#9ca3af;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}
.intent-gpt-target-remove:hover{
  color:#7c3aed;
}
.intent-gpt-add-target{
  margin-top:4px;
}
.audio-tts-btn.alice-ai-btn.ghost{
  background:#fbf8ff;
  color:#7c3aed;
  border:1px solid #e8ddff;
  box-shadow:none;
}
.audio-tts-btn.alice-ai-btn.ghost:hover{
  background:#f3ecff;
  color:#6d28d9;
}
.intent-current-actions{
  position:absolute;
  top:50%;
  right:var(--intent-row-actions-right, -30px);
  transform:translateY(-50%);
  z-index:3;
  pointer-events:none;
}
.intent-current-row .intent-port-actions{
  position:static;
  flex-direction:column;
  gap:2px;
  padding:0;
  border:none;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.intent-current-hover-actions{
  opacity:0;
  visibility:hidden;
  transform:translateX(-2px);
  transition:opacity .16s ease, transform .16s ease, visibility .16s ease;
  pointer-events:auto;
}
.intent-current-row:hover .intent-current-hover-actions,
.intent-current-row:focus-visible .intent-current-hover-actions{
  opacity:1;
  visibility:visible;
  transform:translateX(0);
}
.intent-current-add{
  width:100%;
  height:56px;
  margin-top:0;
  border-left:2px dashed #d8dce2;
  border-right:2px dashed #d8dce2;
  border-bottom:2px dashed #d8dce2;
  border-top:none;
  border-radius:0 0 30px 30px;
  background:#fff;
  color:#6b7280;
  font-size:14px;
  font-weight:500;
  font-family:inherit;
  cursor:pointer;
  transition:background .16s ease, color .16s ease, border-color .16s ease;
}
.intent-current-add:hover{
  background:#fcfcfd;
  color:#2563eb;
  border-left-color:#c8d2e0;
  border-right-color:#c8d2e0;
  border-bottom-color:#c8d2e0;
}
.intent-gpt-shell-actions{
  padding:14px 16px 0;
}
.intent-gpt-goal-text{
  min-height:64px;
  padding:0;
  border:none;
  background:transparent;
  resize:vertical;
  line-height:1.5;
  font-size:16px;
  color:#111827;
  margin-bottom:6px;
}
.intent-gpt-goal-text::placeholder{
  color:#94a3b8;
}
.intent-gpt-save-btn{
  background:#3b63ea;
  color:#fff;
  border:1px solid #3b63ea;
  box-shadow:none;
}
.intent-gpt-save-btn:hover{
  background:#3358d8;
  color:#fff;
}
.intent-gpt-controls{
  margin-top:20px;
}
.intent-gpt-actions{
  gap:10px;
}
.intent-gpt-panel .audio-tts-btn{
  height:52px;
  border-radius:16px;
  font-size:13px;
  font-weight:600;
}
.intent-gpt-panel .audio-tts-btn.alice-ai-btn{
  width:100%;
  margin-top:0;
}
.intent-gpt-cancel-btn{
  margin-top:12px;
}
.intent-gpt-panel .intent-create-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.intent-gpt-panel .intent-create-name-field{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:10px;
  align-items:center;
  margin-bottom:18px;
}
.intent-gpt-panel .intent-create-name-label{
  font-size:13px;
  font-weight:600;
  color:#7b8798;
}
.intent-gpt-panel .intent-create-name-input{
  height:58px;
  padding:0 18px;
  border-radius:12px;
  font-size:16px;
}
.intent-gpt-panel .intent-inline-section-label{
  font-size:12px;
  font-weight:600;
  color:#7b8798;
}
.intent-gpt-panel .intent-inline-grid{
  gap:14px;
}
.intent-gpt-panel .psel{
  padding-right:40px;
}
.intent-gpt-panel .intent-current-add{
  margin-top:0;
}
.intent-create-name-field{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:12px;
}
.intent-create-name-label{
  flex-shrink:0;
  font-size:12px;
  font-weight:600;
  color:#64748b;
}
.intent-create-name-input{
  height:34px;
  padding:6px 10px;
  border:1px solid #dbe3ee;
  border-radius:4px;
}
.intent-choice-card-icon,
.intent-system-card-icon{
  width:44px;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#6b7280;
  flex-shrink:0;
}
.intent-system-shell .intent-system-card-icon{
  width:54px;
  color:#6b7280;
}
.intent-choice-card-icon svg,
.intent-system-card-icon svg{
  width:22px;
  height:22px;
}
.intent-system-shell .intent-system-card-icon svg{
  width:24px;
  height:24px;
}
.intent-choice-card-copy,
.intent-system-card-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px 0;
}
.intent-system-shell .intent-system-card-copy{
  gap:4px;
  padding:18px 0;
}
.intent-choice-card-title,
.intent-system-card-title{
  font-size:14px;
  font-weight:600;
  line-height:1.25;
  color:#1f2937;
}
.intent-system-shell .intent-system-card-title{
  font-size:16px;
  font-weight:600;
  line-height:1.2;
  color:#1f2937;
}
.intent-choice-card-sub,
.intent-system-card-sub{
  font-size:11px;
  line-height:1.3;
  color:#6b7280;
}
.intent-system-shell .intent-system-card-sub{
  font-size:13px;
  line-height:1.35;
  color:#6b7280;
}
.intent-system-row{
  color:#2D69DA;
}
.intent-system-row:hover{
  border-color:#d7dbe1;
  background:#fff;
  box-shadow:none;
}
.intent-system-row.active{
  border-color:#d7dbe1;
  background:#fff;
  box-shadow:none;
}
.intent-system-row-title{
  padding-left:28px;
  padding-right:12px;
  text-align:left;
}
.intent-system-empty{
  font-size:12px;
  color:#9ca3af;
}
.phrase-list{display:flex;flex-wrap:wrap;gap:4px;min-height:4px;}
.phrase-chip{display:inline-flex;align-items:center;gap:3px;background:#ede9fe;border:1px solid #c4b5fd;border-radius:20px;padding:2px 4px 2px 9px;font-size:12px;color:#5b21b6;}
.phrase-chip button{background:none;border:none;cursor:pointer;color:#7c3aed;font-size:13px;line-height:1;padding:0 2px;opacity:.7;}
.phrase-chip button:hover{opacity:1;}
.phrase-chip-pattern{
  background:#eef6ff;
  border-color:#bdd6ff;
  color:#235fc7;
}
.phrase-chip-pattern button{
  color:#235fc7;
}

/* ── Google Sheets CRM ─────────────────────────────────────── */
.gs-crm-list-row{display:flex;align-items:center;gap:6px;}
.gs-crm-toggle{display:inline-flex;align-items:center;cursor:pointer;flex-shrink:0;}
.gs-crm-toggle input{width:32px;height:18px;cursor:pointer;accent-color:#16a34a;}
