h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --ivr-ink: #0f172a;
    --ivr-muted: #64748b;
    --ivr-accent: #0f766e;
    --ivr-accent-soft: #ccfbf1;
    --ivr-sun: #f59e0b;
    --ivr-sand: #f8fafc;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
    color: var(--ivr-ink);
    background:
        radial-gradient(1200px circle at 0% 0%, rgba(16, 185, 129, 0.16), transparent 55%),
        radial-gradient(900px circle at 100% 0%, rgba(251, 191, 36, 0.2), transparent 50%),
        var(--ivr-sand);
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reveal {
    animation: rise-in 0.6s ease-out both;
}

.reveal-delay-1 {
    animation-delay: 120ms;
}

.reveal-delay-2 {
    animation-delay: 240ms;
}

.reveal-delay-3 {
    animation-delay: 360ms;
}

.float-in {
    animation: float-in 0.8s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .float-in {
        animation: none;
    }
}

.rf-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.rf-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.rf-btn-primary {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.ivr-sidebar.is-collapsed {
    width: 88px;
    padding-left: 12px;
    padding-right: 12px;
}

.ivr-sidebar.is-collapsed .nav-text,
.ivr-sidebar.is-collapsed .sidebar-text,
.ivr-sidebar.is-collapsed .sidebar-health {
    display: none;
}

.ivr-sidebar.is-collapsed nav {
    margin-top: 16px;
}

.ivr-sidebar.is-collapsed .rounded-2xl {
    border-radius: 16px;
}

.sidebar-collapsed {
    gap: 16px;
}

.ivr-tool-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    overflow-x: hidden;
    overflow-y: visible;
    padding-bottom: 2px;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    align-content: flex-start;
}

.ivr-tool-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    max-width: 100%;
    overflow-x: hidden;
}

.ivr-tool-tab {
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    padding: 6px 10px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.ivr-tool-tab:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(100, 116, 139, 0.6);
    color: #0f172a;
}

.ivr-tool-tab.is-active {
    background: #0f172a;
    border-color: #0f172a;
    color: white;
    box-shadow: 0 10px 22px -14px rgba(15, 23, 42, 0.5);
}

.ivr-tool-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: visible;
}

.ivr-flow-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 40;
    padding: 20px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96));
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ivr-flow-fullscreen .ivr-tool-wrap {
    width: 100%;
    max-width: 100%;
}

.ivr-flow-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ivr-flow-toolbar {
    width: 100%;
}

.ivr-flow-fullscreen .ivr-diagram-host {
    flex: 1;
    min-height: 0;
}

.ivr-flow-sidebar {
    position: fixed;
    top: 90px;
    right: 24px;
      width: 340px;
      max-width: calc(100vw - 48px);
      max-height: calc(100vh - 140px);
      padding: 20px;
      border-radius: 24px;
      background: rgba(255, 255, 255, 0.96);
      border: 1px solid #e2e8f0;
      box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
      overflow-y: auto;
    z-index: 45;
}

.ivr-flow-sidebar-header {
    cursor: move;
}

.ivr-flow-properties {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    max-height: 50%;
    padding: 14px 16px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e2e8f0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    z-index: 30;
}

.ivr-flow-properties .ivr-flow-sidebar-header {
    cursor: default;
    align-items: center;
    gap: 12px;
}

.ivr-flow-properties .ivr-flow-sidebar-header h2 {
    font-size: 0.95rem;
}

.ivr-flow-properties .ivr-flow-sidebar-header p {
    font-size: 0.5rem;
    letter-spacing: 0.25em;
}

.ivr-flow-properties .ivr-flow-sidebar-header button {
    padding: 0;
    font-size: 0.9rem;
}

.ivr-flow-properties-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px !important;
}

.ivr-flow-properties-body > * + * {
    margin-top: 0 !important;
}

.ivr-flow-properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.ivr-flow-properties-span {
    grid-column: 1 / -1;
}

.ivr-flow-properties label {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
}

.ivr-flow-properties input,
.ivr-flow-properties select,
.ivr-flow-properties textarea {
    padding: 8px 12px;
    font-size: 0.82rem;
    border-radius: 14px;
}

.ivr-flow-properties textarea {
    min-height: 78px;
}

.ivr-flow-properties button {
    padding: 6px 12px;
    font-size: 0.7rem;
}

.ivr-flow-properties .text-xs {
    font-size: 0.7rem;
}

.ivr-flow-properties .mt-6 {
    margin-top: 12px !important;
}

.ivr-feedback-button {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 60;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #4f46e5;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ivr-feedback-button:hover {
    border-color: #4f46e5;
    box-shadow: 0 16px 32px rgba(79, 70, 229, 0.2);
    transform: translateY(-1px);
}

  .ivr-flow-shell {
      display: flex;
      gap: 16px;
      align-items: stretch;
      height: calc(100vh - 240px);
  }

  .ivr-flow-main {
      flex: 1;
      min-width: 0;
      height: 100%;
  }

  .ivr-canvas-tools {
      position: absolute;
      top: 12px;
      right: 12px;
      display: flex;
      gap: 8px;
      z-index: 20;
  }

  .ivr-canvas-tool {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      border: 1px solid rgba(226, 232, 240, 0.9);
      background: rgba(255, 255, 255, 0.85);
      color: #0f172a;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
      transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
      opacity: 0.8;
  }

  .ivr-canvas-tool:hover:not(:disabled) {
      opacity: 1;
      transform: translateY(-1px);
      box-shadow: 0 12px 22px rgba(15, 23, 42, 0.14);
  }

  .ivr-canvas-tool:disabled {
      opacity: 0.45;
      cursor: not-allowed;
  }

  .ivr-flow-toolbar {
      width: 300px;
      min-width: 280px;
      border-radius: 20px;
      border: 1px solid #e2e8f0;
      background: rgba(255, 255, 255, 0.92);
      padding: 12px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
      position: sticky;
      top: 96px;
      align-self: stretch;
      height: 100%;
      max-height: calc(100vh - 118px);
      overflow: hidden;
  }

  .ivr-flow-toolbar.is-collapsed {
      width: 72px;
      min-width: 72px;
      padding: 12px;
      gap: 12px;
  }

  .ivr-flow-toolbar.is-collapsed .ivr-toolbar-title,
  .ivr-flow-toolbar.is-collapsed .ivr-toolbar-fields,
  .ivr-flow-toolbar.is-collapsed .ivr-toolbar-tools {
      display: none;
  }

  .ivr-flow-toolbar.is-collapsed .ivr-toolbar-actions {
      flex-direction: column;
      align-items: center;
  }

  .ivr-toolbar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
  }

  .ivr-toolbar-title p {
      font-size: 0.48rem;
      letter-spacing: 0.18em;
  }

  .ivr-toolbar-title h3 {
      font-size: 0.8rem;
  }

  .ivr-toolbar-toggle {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      border: 1px solid #e2e8f0;
      background: #ffffff;
      color: #0f172a;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }

  .ivr-flow-toolbar.is-collapsed .ivr-toolbar-toggle svg {
      transform: rotate(180deg);
  }

  .ivr-toolbar-toggle:hover {
      border-color: #0f172a;
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.15);
      transform: translateY(-1px);
  }

  .ivr-toolbar-input {
      width: 100%;
      border-radius: 12px;
      border: 1px solid #e2e8f0;
      background: #ffffff;
      padding: 0.42rem 0.65rem;
      font-size: 0.74rem;
      color: #334155;
  }

  .ivr-toolbar-fields {
      display: flex;
      flex-direction: column;
      gap: 5px;
  }

  .ivr-toolbar-fields .mt-3 {
      margin-top: 6px !important;
  }

  .ivr-toolbar-fields .mt-4 {
      margin-top: 6px !important;
  }

  .ivr-toolbar-tools {
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow-y: auto;
      overflow-x: hidden;
      padding-right: 2px;
      width: 100%;
  }

  .ivr-toolbar-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      overflow-x: hidden;
  }

  .ivr-action {
      position: relative;
      width: 52px;
      height: 52px;
      border-radius: 12px;
      border: 1px solid #e2e8f0;
      background: #ffffff;
      color: #0f172a;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2px;
      transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  }

  .ivr-action:hover {
      border-color: #0f172a;
      box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
      transform: translateY(-1px);
  }

  .ivr-action.is-danger {
      color: #b91c1c;
      border-color: rgba(248, 113, 113, 0.4);
      background: rgba(254, 226, 226, 0.6);
  }

  .ivr-action svg {
      width: 17px;
      height: 17px;
  }

  .ivr-action-label {
      font-size: 0.48rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      color: inherit;
  }

  .ivr-action-tooltip {
      position: absolute;
      left: 50%;
      bottom: calc(100% + 8px);
      top: auto;
      transform: translateX(-50%);
      padding: 6px 10px;
      border-radius: 10px;
      border: 1px solid #e2e8f0;
      background: #ffffff;
      color: #0f172a;
      font-size: 0.65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
      transition: opacity 0.15s ease;
      z-index: 20;
  }

  .ivr-action-tooltip.is-bottom {
      top: calc(100% + 8px);
      bottom: auto;
  }

  .ivr-action:hover .ivr-action-tooltip {
      opacity: 1;
  }

  .ivr-flow-toolbar.is-collapsed .ivr-action-label {
      display: none;
  }

  .ivr-flow-toolbar.is-collapsed .ivr-action svg {
      width: 10px;
      height: 10px;
  }

  .ivr-flow-toolbar.is-collapsed .ivr-action {
      width: 28px;
      height: 28px;
      border-radius: 8px;
  }

  @media (max-width: 1024px) {
      .ivr-flow-shell {
          flex-direction: column;
          height: auto;
      }

      .ivr-flow-toolbar {
          width: 100%;
          min-width: 0;
          position: static;
          height: auto;
          max-height: none;
      }

      .ivr-flow-toolbar.is-collapsed {
          width: 100%;
      }
  }

.ivr-tool {
    position: relative;
    flex: 0 0 auto;
    width: 60px;
    border: none;
    border-radius: 12px;
    padding: 2px 1px 4px;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    box-shadow: none;
    transition: transform 0.2s ease;
}

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

.ivr-tool-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: var(--ivr-tool-color, #e2e8f0);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ivr-tool:hover .ivr-tool-icon {
    border-color: #0f172a;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

  .ivr-tool-text {
      position: absolute;
      left: 0;
      top: auto;
      bottom: calc(100% + 10px);
      transform: none;
      display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 200px;
    max-width: min(260px, calc(100vw - 32px));
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: var(--ivr-ink);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 9999;
      white-space: normal;
      overflow-wrap: break-word;
  }

  .ivr-tool-text.is-bottom {
      top: calc(100% + 10px);
      bottom: auto;
  }

.ivr-tool:hover .ivr-tool-text,
.ivr-tool:focus-visible .ivr-tool-text {
    opacity: 1;
}

.ivr-tool-title {
    display: block;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ivr-ink);
}

.ivr-tool-sub {
    display: block;
    margin-top: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--ivr-muted);
}

.ivr-tool-label {
    font-size: 0.48rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #475569;
    text-align: center;
}

.ivr-tool:hover .ivr-tool-label {
    color: #0f172a;
}
.ivr-tool-icon svg {
    width: 16px;
    height: 16px;
}

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

.audio-flow-toolbar-fields {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(220px, 1fr);
    gap: 10px;
}

.audio-flow-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.audio-flow-field label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #64748b;
}

.audio-flow-input {
    width: 100%;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    padding: 0.45rem 0.7rem;
    font-size: 0.8rem;
    color: #334155;
}

.audio-flow-toolbar-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.audio-flow-tool-sep {
    width: 1px;
    height: 24px;
    margin: 0 4px;
    background: #cbd5e1;
}

.audio-flow-tool-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.audio-flow-tool-btn:hover {
    border-color: #64748b;
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
    transform: translateY(-1px);
}

.audio-flow-tool-btn:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 1px;
}

.audio-flow-tool-btn i {
    font-size: 0.78rem;
}

.audio-flow-tool-btn.is-primary {
    border-color: #0f766e;
    color: #0f766e;
    background: #f0fdfa;
}

.audio-flow-tool-btn.is-danger {
    border-color: #fca5a5;
    color: #b91c1c;
    background: #fef2f2;
}

.audio-flow-tool-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.audio-flow-tool-tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    padding: 5px 8px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 40;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
    transition: opacity 0.12s ease;
}

.audio-flow-tool-btn:hover .audio-flow-tool-tip,
.audio-flow-tool-btn:focus-visible .audio-flow-tool-tip {
    opacity: 1;
}

.audio-flow-busy {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.3rem 0.55rem;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #475569;
}

.audio-flow-busy-spin {
    width: 13px;
    height: 13px;
    border: 2px solid #cbd5e1;
    border-top-color: #334155;
    border-radius: 9999px;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .audio-flow-toolbar-fields {
        grid-template-columns: 1fr;
    }

    .audio-flow-busy {
        margin-left: 0;
    }
}


  .ivr-diagram-host {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      overflow: hidden;
      position: relative;
      height: 100%;
  }

  .ivr-diagram-host .diagram-group {
      border-radius: 22px;
      border: 2px dashed rgba(100, 116, 139, 0.7);
      background: rgba(148, 163, 184, 0.08);
  }

  .ivr-diagram-host .diagram-group.selected {
      border-color: rgba(15, 118, 110, 0.8);
      box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
  }

  .ivr-group-header {
      position: absolute;
      top: 8px;
      left: 10px;
      z-index: 3;
      max-width: calc(100% - 20px);
  }

  .ivr-group-input {
      width: 100%;
      max-width: 220px;
      border: 1px solid #e2e8f0;
      border-radius: 999px;
      padding: 2px 10px;
      font-size: 0.65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: #334155;
      background: rgba(255, 255, 255, 0.9);
  }

  .ivr-group-input:focus {
      outline: none;
      border-color: rgba(15, 118, 110, 0.7);
      box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2);
  }

.ivr-simulator-bar {
    position: relative;
    z-index: 5;
}

.ivr-node {
    --ivr-port-start: 68px;
    --ivr-port-row-height: 22px;
    min-width: 190px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ivr-node.is-spawning {
    animation: ivr-node-pop-in 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.ivr-node.is-spawning .diagram-port {
    pointer-events: none;
}

@keyframes ivr-node-pop-in {
    0% {
        opacity: 0;
        transform: translate(var(--ivr-spawn-x, -110px), var(--ivr-spawn-y, -24px)) scale(0.78);
    }

    65% {
        opacity: 1;
        transform: translate(0, 0) scale(1.03);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

.ivr-node-tts {
    max-width: 300px;
}

.ivr-node-dtmf {
    --ivr-port-start: 72px;
}

.ivr-node.is-selected {
    border-color: #0f766e;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.18);
}

.ivr-node.is-active {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25), 0 18px 36px rgba(56, 189, 248, 0.2);
}

.ivr-node.is-disabled {
    opacity: 0.6;
    filter: grayscale(0.4);
    border-style: dashed;
    background: #f8fafc;
}

.ivr-node-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ivr-node-header-tools {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ivr-node-headline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ivr-node-icon {
    width: 26px;
    height: 26px;
    border-radius: 10px;
    background: var(--ivr-node-color, #e2e8f0);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ivr-node-icon svg {
    width: 16px;
    height: 16px;
}

.ivr-node-title {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #64748b;
    font-weight: 600;
}

.ivr-node-alert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.65rem;
    font-weight: 700;
}

.ivr-node-properties-btn {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.ivr-node-properties-btn svg {
    width: 12px;
    height: 12px;
}

.ivr-node-properties-btn:hover {
    border-color: #0f766e;
    color: #0f766e;
    background: #f0fdfa;
}

.ivr-node-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ivr-node-label {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #94a3b8;
}

.ivr-node-value {
    font-size: 0.75rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ivr-node-muted {
    font-size: 0.7rem;
    color: #94a3b8;
}

.ivr-node-outputs {
    display: grid;
    gap: 4px;
}

.ivr-node-output-row {
    height: var(--ivr-port-row-height);
    display: flex;
    align-items: center;
    padding: 0 12px 0 10px;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 0.7rem;
    color: #0f172a;
}

.ivr-node .diagram-port {
    width: 14px;
    height: 14px;
    margin: -7px;
    border-radius: 999px;
    border: 2px solid #94a3b8;
    background: #ffffff;
    position: absolute;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ivr-port-label {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 2;
}

.diagram-port:hover .ivr-port-label {
    opacity: 1;
}

.ivr-port-alert {
    position: absolute;
    top: -7px;
    right: -8px;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #b91c1c;
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    box-shadow: 0 0 0 2px #ffffff;
    pointer-events: none;
    z-index: 3;
}

.ivr-node .diagram-port.ivr-port-invalid {
    border-color: #b91c1c;
    background: #fee2e2;
}

.ivr-node .diagram-port.left {
    left: 0;
    top: 50%;
}

.ivr-node .diagram-port.right {
    right: 0;
    top: 50%;
}

.ivr-node .diagram-port.top {
    top: 0;
    left: 50%;
}

.ivr-node .diagram-port.bottom {
    bottom: 0;
    left: 50%;
}

.ivr-node .diagram-port.bottom.ivr-port-bottom-right {
    left: auto;
    right: 0;
    bottom: 5px;
    right: 5px;
}

.ivr-node .diagram-port.has-links,
.ivr-node .diagram-port:hover {
    background: #0f766e;
    border-color: #0f766e;
}

.ivr-node .diagram-port.ivr-port-out {
    right: -6px !important;
    top: calc(var(--ivr-port-start) + (var(--ivr-port-row-height) * var(--ivr-port-index))) !important;
}

.ivr-sim-diagram .diagram-node,
.ivr-sim-diagram .diagram-link,
.ivr-sim-diagram .diagram-port {
    pointer-events: none;
}

.ivr-context-menu {
    position: fixed;
    z-index: 50;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
    padding: 6px;
}

.ivr-context-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    color: #0f172a;
    cursor: pointer;
}

.ivr-context-item:hover,
.ivr-context-item.is-active {
    background: #0f172a;
    color: #ffffff;
}

.ivr-context-item:hover span,
.ivr-context-item.is-active span {
    color: #ffffff;
}

.ivr-context-item.is-danger {
    color: #b91c1c;
}

.ivr-context-item.is-danger:hover {
    background: #fee2e2;
    color: #991b1b;
}

.ivr-context-icon {
    margin-top: 1px;
    display: flex;
    height: 28px;
    width: 28px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #334155;
}

.ivr-context-icon svg {
    width: 14px;
    height: 14px;
}

.ivr-progress-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    position: relative;
}

.ivr-progress-bar span {
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.2), rgba(15, 118, 110, 0.9), rgba(15, 118, 110, 0.2));
    animation: ivr-progress-slide 1.2s ease-in-out infinite;
}

@keyframes ivr-progress-slide {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(250%);
    }
}

.loader,
.loader:before,
.loader:after {
    width: 35px;
    aspect-ratio: 1;
    box-shadow: 0 0 0 3px inset #0f172a;
    position: relative;
    animation: l6 1.5s infinite 0.5s;
}

.loader:before,
.loader:after {
    content: "";
    position: absolute;
    left: calc(100% + 5px);
    animation-delay: 1s;
}

.loader:after {
    left: -40px;
    animation-delay: 0s;
}

@keyframes l6 {
    0%, 55%, 100% {
        border-radius: 0;
    }
    20%, 30% {
        border-radius: 50%;
    }
}
