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: 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: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 12px;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 6px 0 2px;
    max-width: 100%;
    min-width: 0;
    width: 100%;
    align-content: flex-start;
    justify-items: center;
}

.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;
}

.audio-preview-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.audio-preview-card {
    position: relative;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9)),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 40%);
    padding: 20px;
    box-shadow: 0 18px 40px -30px rgba(15, 23, 42, 0.55);
}

.audio-preview-folder-card {
    display: block;
    width: 100%;
    border-radius: 28px;
    border: 1px solid rgba(245, 158, 11, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(255, 255, 255, 0.96)),
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 42%);
    padding: 20px;
    box-shadow: 0 18px 40px -30px rgba(180, 83, 9, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.audio-preview-folder-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.38);
    box-shadow: 0 24px 48px -30px rgba(180, 83, 9, 0.45);
}

.audio-preview-folder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: #d97706;
    background: rgba(251, 191, 36, 0.18);
}

.audio-preview-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    color: #0f766e;
    padding: 6px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.audio-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #64748b;
    font-size: 0.78rem;
}

.voice-customiser-shell {
    display: grid;
    gap: 16px;
}

.voice-customiser-mixer-panel {
    display: flex;
    flex-direction: column;
}

.voice-customiser-mixer-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background:
        radial-gradient(circle at center, rgba(16, 185, 129, 0.14), transparent 58%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
    padding: 14px;
}

.voice-customiser-mixer-stage {
    position: relative;
    width: 320px;
    height: 320px;
    max-width: 100%;
}

.voice-customiser-mixer {
    width: 320px;
    height: 320px;
    max-width: 100%;
    touch-action: none;
    user-select: none;
}

.voice-customiser-polygon {
    fill: rgba(15, 118, 110, 0.1);
    stroke: rgba(15, 118, 110, 0.4);
    stroke-width: 2;
}

.voice-customiser-axis {
    stroke: rgba(148, 163, 184, 0.45);
    stroke-width: 1.5;
}

.voice-customiser-anchor {
    fill: #f8fafc;
    stroke: #0f766e;
    stroke-width: 3;
}

.voice-customiser-anchor-name {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 28px;
    color: #0f172a;
    font-size: 0.52rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    word-break: break-word;
    overflow: hidden;
    pointer-events: none;
}

.voice-customiser-handle-shadow {
    fill: rgba(15, 23, 42, 0.12);
}

.voice-customiser-handle {
    fill: #0f172a;
    stroke: #ffffff;
    stroke-width: 3;
}

.voice-customiser-voice-slot {
    border-radius: 22px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.75);
    padding: 14px;
}

.voice-customiser-sidebar,
.voice-customiser-advanced {
    box-shadow: 0 18px 40px -32px rgba(15, 23, 42, 0.38);
}

.voice-customiser-preset-list {
    display: grid;
    gap: 10px;
}

.voice-customiser-preset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 22px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(248, 250, 252, 0.65);
    padding: 14px;
}

.voice-customiser-preset-item.is-active {
    border-color: rgba(15, 23, 42, 0.3);
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.95), rgba(255, 255, 255, 0.98));
}

@media (max-width: 640px) {
    .voice-customiser-mixer-stage,
    .voice-customiser-mixer {
        width: 280px;
        height: 280px;
    }

    .voice-customiser-preset-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.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-page {
      display: flex;
      flex-direction: column;
      height: calc(100vh - 32px);
      min-height: calc(100vh - 32px);
      overflow: hidden;
  }

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

  .ivr-flow-main {
      display: flex;
      flex-direction: column;
      flex: 1 1 auto;
      min-width: 0;
      min-height: 0;
      gap: 12px;
  }

  .ivr-flow-statusbar {
      flex: 0 0 auto;
      align-self: stretch;
  }

  .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);
      align-self: stretch;
      height: auto;
      min-height: 0;
      overflow: visible;
  }

  .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-flow-toolbar.is-collapsed .ivr-toolbar-action-row {
      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-autosave-toggle {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-width: 0;
      font-size: 0.68rem;
      font-weight: 700;
      color: #0f172a;
      text-transform: uppercase;
      letter-spacing: 0.16em;
      white-space: nowrap;
  }

  .ivr-autosave-checkbox {
      width: 14px;
      height: 14px;
      margin: 0;
      accent-color: #0f172a;
  }

  .ivr-autosave-label {
      line-height: 1;
  }

  .ivr-autosave-interval {
      flex: 0 0 auto;
      border-radius: 999px;
      background: #ffffff;
      padding: 3px 7px;
      font-size: 0.58rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.18em;
      color: #64748b;
      border: 1px solid rgba(226, 232, 240, 0.9);
      white-space: nowrap;
  }

  .ivr-flow-tree-panel {
      max-height: none;
      overflow: visible;
      scrollbar-width: thin;
      scrollbar-color: rgba(100, 116, 139, 0.55) rgba(226, 232, 240, 0.55);
  }

  .ivr-flow-tree-panel::-webkit-scrollbar {
      width: 10px;
  }

  .ivr-flow-tree-panel::-webkit-scrollbar-track {
      background: rgba(226, 232, 240, 0.55);
      border-radius: 999px;
  }

  .ivr-flow-tree-panel::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, rgba(148, 163, 184, 0.95), rgba(100, 116, 139, 0.95));
      border-radius: 999px;
      border: 2px solid rgba(255, 255, 255, 0.9);
  }

  .ivr-flow-tree-panel::-webkit-scrollbar-thumb:hover {
      background: linear-gradient(180deg, rgba(100, 116, 139, 1), rgba(51, 65, 85, 1));
  }

  .ivr-flow-tree-group {
      min-height: 34px;
      padding-top: 0.38rem;
      padding-bottom: 0.38rem;
  }

  .ivr-flow-tree-leaf {
      min-height: 32px;
      padding-top: 0.34rem;
      padding-bottom: 0.34rem;
  }

  .ivr-toolbar-tools {
      display: flex;
      flex-direction: column;
      flex: 1 1 auto;
      min-height: 0;
      overflow: visible;
      padding: 0;
      width: 100%;
      gap: 8px;
  }

  .ivr-node-search {
      margin-top: 2px;
      border: 1px solid #dce3ee;
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.94);
      padding: 9px 10px 8px;
  }

  .ivr-node-search-label {
      display: block;
      font-size: 0.5rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: #64748b;
  }

  .ivr-node-search-input {
      margin-top: 7px;
      width: 100%;
      border-radius: 14px;
      border: 1px solid #d3dce8;
      background: #fff;
      color: #334155;
      font-size: 0.78rem;
      line-height: 1.15;
      padding: 10px 12px;
  }

  .ivr-node-search-input::placeholder {
      color: #94a3b8;
  }

  .ivr-node-search-meta {
      margin-top: 7px;
      font-size: 0.72rem;
      color: #64748b;
      line-height: 1.25;
  }

  .ivr-toolbar-actions {
      display: flex;
      flex-direction: column;
      gap: 6px;
      width: 100%;
  }

  .ivr-toolbar-action-row {
      display: flex;
      flex-wrap: nowrap;
      justify-content: space-between;
      gap: 6px;
      width: 100%;
      overflow: hidden;
  }

  .ivr-action {
      position: relative;
      flex: 0 0 auto;
      width: 36px;
      min-width: 36px;
      height: 36px;
      border-radius: 10px;
      border: 1px solid #e2e8f0;
      background: #ffffff;
      color: #0f172a;
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 0;
      padding: 0;
      transition: border-color 0.2s ease, background-color 0.2s ease;
  }

  .ivr-action:hover {
      border-color: #0f172a;
      background: #f8fafc;
  }

  .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: 15px;
      height: 15px;
      flex: 0 0 auto;
  }

  .ivr-action-label {
      display: none;
  }

  .ivr-action-tooltip {
      display: none;
  }

  .ivr-action-tooltip.is-bottom {
      display: none;
  }

  .ivr-action:hover .ivr-action-tooltip {
      display: none;
  }

  .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 {
      flex: 0 0 auto;
      width: 28px;
      min-width: 28px;
      height: 28px;
      border-radius: 8px;
      padding: 0;
  }

  @media (max-width: 1024px) {
      .ivr-flow-page {
          height: auto;
          min-height: auto;
          overflow: visible;
      }

      .ivr-flow-shell {
          flex-direction: column;
          height: auto;
          min-height: auto;
      }

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

      .ivr-flow-toolbar.is-collapsed {
          width: 100%;
      }
  }

.ivr-tool {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    max-width: 62px;
    border: none;
    border-radius: 12px;
    padding: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
    box-shadow: none;
    transition: none;
}

.ivr-tool:hover {
    transform: none;
}

.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: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ivr-tool:hover .ivr-tool-icon {
    border-color: #0f172a;
    background: color-mix(in srgb, var(--ivr-tool-color, #e2e8f0) 88%, white 12%);
}

  .ivr-tool-text {
      display: none;
  }

  .ivr-tool-text.is-bottom {
      display: none;
  }

.ivr-tool:hover .ivr-tool-text,
.ivr-tool:focus-visible .ivr-tool-text {
    display: none;
}

.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.5rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #475569;
    text-align: center;
    line-height: 1.2;
}

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

.ivr-floating-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-50%);
    display: block;
    min-width: 0;
    max-width: min(280px, calc(100vw - 24px));
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.06em;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    white-space: normal;
    overflow-wrap: break-word;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
    z-index: 99999;
}

.ivr-floating-tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}

.ivr-floating-tooltip .ivr-tool-sub {
    display: block;
    margin-top: 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #334155;
}

.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;
      flex: 1 1 auto;
      min-height: 0;
      height: auto;
  }

  .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%;
    }
}

.dashboard-header-card,
.dashboard-kpi-card,
.dashboard-panel {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    backdrop-filter: none;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.dashboard-header-card {
    border-radius: 28px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.dashboard-header-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-header-copy {
    max-width: 760px;
}

.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #0f766e;
}

.dashboard-eyebrow-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #99f6e4, #0f766e);
    box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.12);
}

.dashboard-header-title {
    margin: 0.7rem 0 0;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: #0f172a;
}

.dashboard-header-text {
    margin: 0.55rem 0 0;
    max-width: 62ch;
    font-size: 0.92rem;
    line-height: 1.55;
    color: #475569;
}

.dashboard-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
}

.dashboard-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #334155;
    background: rgba(248, 250, 252, 0.92);
}

.dashboard-live-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    animation: dashboard-live-pulse 1.8s ease-out infinite;
}

.dashboard-live-pill.is-loading .dashboard-live-dot {
    background: #f59e0b;
    animation-duration: 1.2s;
}

@keyframes dashboard-live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

.dashboard-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.dashboard-summary-chip {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.95rem 1rem;
    background: #ffffff;
}

.dashboard-summary-label,
.dashboard-section-kicker,
.dashboard-note-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #64748b;
}

.dashboard-summary-chip strong,
.dashboard-brief-row strong {
    font-size: 1rem;
    color: #0f172a;
}

.dashboard-summary-chip span:last-child,
.dashboard-brief-row p,
.dashboard-signal-card p,
.dashboard-platform-card p,
.dashboard-kpi-subtitle,
.dashboard-worker-meta,
.dashboard-call-meta,
.dashboard-command-footer,
.dashboard-empty-state {
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
}

.dashboard-command-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.dashboard-command-error {
    color: #b91c1c;
}

.dashboard-inline-error {
    margin-top: 0.85rem;
    border: 1px solid #fecdd3;
    border-radius: 18px;
    background: rgba(255, 241, 242, 0.95);
    padding: 0.8rem 0.95rem;
    font-size: 0.84rem;
    color: #be123c;
}

.dashboard-kpi-grid,
.dashboard-primary-grid,
.dashboard-secondary-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.dashboard-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-primary-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    align-items: start;
}

.dashboard-secondary-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
}

.dashboard-primary-stack {
    display: grid;
    gap: 1rem;
}

.dashboard-kpi-card,
.dashboard-panel {
    border-radius: 24px;
    padding: 1rem;
}

.dashboard-kpi-topline,
.dashboard-panel-header,
.dashboard-signal-head,
.dashboard-platform-title,
.dashboard-call-main,
.dashboard-worker-title-row,
.dashboard-worker-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.dashboard-kpi-topline,
.dashboard-panel-meta {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
}

.dashboard-kpi-value {
    margin-top: 0.55rem;
    font-size: clamp(1.8rem, 2.4vw, 2.3rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: #0f172a;
}

.dashboard-kpi-subtitle {
    margin-top: 0.45rem;
}

.dashboard-kpi-tag,
.dashboard-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.28rem 0.62rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: #ffffff;
    color: #334155;
}

.dashboard-kpi-tag.is-emerald,
.dashboard-status-badge.is-emerald {
    background: #ffffff;
    color: #475569;
}

.dashboard-kpi-tag.is-indigo {
    background: #ffffff;
    color: #475569;
}

.dashboard-kpi-tag.is-amber,
.dashboard-status-badge.is-amber {
    background: #ffffff;
    color: #475569;
}

.dashboard-kpi-tag.is-rose {
    background: #ffffff;
    color: #475569;
}

.dashboard-card-title {
    margin: 0.2rem 0 0;
    font-size: 1.1rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.dashboard-readiness-grid,
.dashboard-platform-grid,
.dashboard-brief-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 0.85rem;
}

.dashboard-readiness-grid,
.dashboard-platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-signal-card,
.dashboard-platform-card,
.dashboard-call-card,
.dashboard-worker-card,
.dashboard-brief-row {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
}

.dashboard-signal-card,
.dashboard-platform-card,
.dashboard-call-card,
.dashboard-brief-row {
    padding: 0.9rem;
}

.dashboard-signal-head strong,
.dashboard-call-timing strong,
.dashboard-worker-stats strong {
    font-size: 0.95rem;
    color: #0f172a;
}

.dashboard-progress-track {
    width: 100%;
    height: 9px;
    margin-top: 0.7rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.dashboard-progress-track span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #14b8a6, #0f766e);
}

.dashboard-call-list,
.dashboard-telemetry-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding-right: 0.2rem;
    overflow-y: auto;
}

.dashboard-call-list {
    min-height: 280px;
    max-height: 360px;
}

.dashboard-telemetry-list {
    min-height: 280px;
    max-height: 420px;
}

.dashboard-call-main {
    align-items: flex-start;
}

.dashboard-call-route,
.dashboard-worker-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.dashboard-call-timing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    text-align: right;
}

.dashboard-worker-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.9rem;
}

.dashboard-worker-card.is-reachable {
    border-color: #bbf7d0;
}

.dashboard-worker-card.is-unreachable {
    border-color: #fecdd3;
}

.dashboard-worker-main {
    min-width: 0;
    flex: 1 1 auto;
}

.dashboard-worker-title-row {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.dashboard-worker-meta {
    margin: 0.3rem 0 0;
}

.dashboard-worker-stats {
    flex-shrink: 0;
    gap: 1rem;
}

.dashboard-worker-stats div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 72px;
    text-align: right;
}

.dashboard-platform-card.is-healthy {
    border-color: #e2e8f0;
    background: #ffffff;
}

.dashboard-platform-card.is-alert {
    border-color: #e2e8f0;
    background: #ffffff;
}

.dashboard-platform-card.is-neutral {
    background: #ffffff;
}

.dashboard-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.7);
    text-align: center;
}

.dashboard-call-list::-webkit-scrollbar,
.dashboard-telemetry-list::-webkit-scrollbar {
    width: 10px;
}

.dashboard-call-list::-webkit-scrollbar-thumb,
.dashboard-telemetry-list::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #cbd5e1;
    background-clip: padding-box;
}

@media (max-width: 1280px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-primary-grid,
    .dashboard-secondary-grid,
    .dashboard-summary-strip {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .dashboard-header-card,
    .dashboard-kpi-card,
    .dashboard-panel {
        padding: 0.95rem;
    }

    .dashboard-header-main,
    .dashboard-worker-card,
    .dashboard-call-main {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-header-actions,
    .dashboard-call-timing,
    .dashboard-worker-stats div {
        align-items: flex-start;
        text-align: left;
    }

    .dashboard-kpi-grid,
    .dashboard-readiness-grid,
    .dashboard-platform-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-worker-stats {
        justify-content: flex-start;
    }
}

.dashboard-header-card {
    padding: 1rem;
    margin-bottom: 0.85rem;
}

.dashboard-header-main {
    align-items: flex-start;
    gap: 0.85rem;
}

.dashboard-header-title {
    font-size: clamp(1.3rem, 2vw, 1.75rem);
    margin-top: 0.45rem;
}

.dashboard-header-text {
    margin-top: 0.4rem;
    max-width: 58ch;
    font-size: 0.84rem;
}

.dashboard-header-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}

.dashboard-live-pill {
    background: #f8fafc;
    border-color: #dbe3ee;
    color: #334155;
    padding: 0.35rem 0.7rem;
    font-size: 0.66rem;
}

.dashboard-live-dot {
    background: #475569;
    box-shadow: 0 0 0 6px rgba(71, 85, 105, 0.1);
}

.dashboard-kpi-grid {
    gap: 0.85rem;
    margin-top: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-primary-grid {
    gap: 0.85rem;
    margin-top: 0.85rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    align-items: start;
}

.dashboard-panel {
    padding: 0.85rem;
}

.dashboard-kpi-card {
    padding: 0.85rem;
    border-radius: 22px;
    background: #ffffff;
}

.dashboard-kpi-value {
    margin-top: 0.35rem;
    font-size: clamp(1.65rem, 2.2vw, 2.05rem);
}

.dashboard-panel-header {
    align-items: flex-start;
}

.dashboard-kpi-tag,
.dashboard-status-badge {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
}

.dashboard-kpi-tag.is-emerald,
.dashboard-kpi-tag.is-indigo,
.dashboard-kpi-tag.is-amber,
.dashboard-kpi-tag.is-rose,
.dashboard-status-badge.is-emerald,
.dashboard-status-badge.is-amber {
    background: #f1f5f9;
    color: #475569;
}

.dashboard-call-list {
    min-height: 182px;
    max-height: 220px;
    margin-top: 0.7rem;
    gap: 0.6rem;
}

.dashboard-empty-state {
    min-height: 80px;
}

.dashboard-empty-state-tight {
    min-height: 64px;
}

.dashboard-health-stack {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.7rem;
}

.dashboard-readiness-grid,
.dashboard-platform-grid {
    gap: 0.7rem;
    margin-top: 0;
}

.dashboard-signal-card,
.dashboard-platform-card,
.dashboard-call-card {
    padding: 0.75rem;
    border-radius: 16px;
    border-color: #e5ebf3;
    background: #ffffff;
}

.dashboard-signal-head,
.dashboard-platform-title,
.dashboard-call-main {
    align-items: flex-start;
}

.dashboard-signal-head strong,
.dashboard-platform-title strong,
.dashboard-call-timing strong {
    font-size: 0.94rem;
}

.dashboard-signal-card p,
.dashboard-platform-card p,
.dashboard-call-meta {
    font-size: 0.72rem;
    line-height: 1.4;
}

.dashboard-call-route {
    font-size: 0.93rem;
}

.dashboard-call-timing {
    gap: 0.35rem;
}

@media (max-width: 1280px) {
    .dashboard-kpi-grid,
    .dashboard-primary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .dashboard-header-main,
    .dashboard-call-main {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-header-actions,
    .dashboard-call-timing,
    .dashboard-worker-stats div {
        align-items: flex-start;
        text-align: left;
    }

    .dashboard-readiness-grid,
    .dashboard-platform-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-live-pill {
        width: fit-content;
    }
}

.gateway-console-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
}

.gateway-console-modal {
    display: flex;
    flex-direction: column;
    width: min(1120px, 96vw);
    max-height: 92vh;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #dbe4ef;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.gateway-console-modal-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.gateway-console-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0f172a;
}

.gateway-console-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.86rem;
    color: #64748b;
}

.gateway-console-toolbar,
.gateway-console-filter-list,
.gateway-console-line-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gateway-console-badge,
.gateway-console-filter,
.gateway-console-clear,
.gateway-console-close {
    border: 1px solid #d7dfeb;
    border-radius: 999px;
    background: #fff;
    color: #475569;
}

.gateway-console-badge,
.gateway-console-clear {
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gateway-console-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
}

.gateway-console-copy-btn {
    white-space: nowrap;
}

.gateway-console-controls {
    display: grid;
    gap: 0.9rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.gateway-console-filter-group {
    display: grid;
    gap: 0.55rem;
}

.gateway-console-filter-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
}

.gateway-console-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.78rem;
    font-size: 0.78rem;
    font-weight: 600;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.gateway-console-filter:hover,
.gateway-console-clear:hover,
.gateway-console-close:hover {
    border-color: #94a3b8;
    color: #1e293b;
}

.gateway-console-filter-include-active {
    border-color: #0f766e;
    background: #f0fdfa;
    color: #0f766e;
}

.gateway-console-filter-exclude-active {
    border-color: #b91c1c;
    background: #fef2f2;
    color: #b91c1c;
}

.gateway-console-shell {
    min-height: 0;
    overflow: auto;
    padding: 1rem 1.5rem 1.5rem;
    background: #fff;
}

.gateway-console-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    color: #64748b;
    font-size: 0.95rem;
    text-align: center;
    background: #f8fafc;
}

.gateway-console-list {
    display: grid;
    gap: 0.55rem;
}

.gateway-console-line {
    border: 1px solid #e2e8f0;
    border-left-width: 3px;
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    background: #fff;
    font-family: Consolas, "Courier New", monospace;
}

.gateway-console-line-info {
    border-left-color: #cbd5e1;
}

.gateway-console-line-warning {
    border-left-color: #d97706;
}

.gateway-console-line-critical {
    border-left-color: #be123c;
}

.gateway-console-line-sip {
    border-left-color: #0284c7;
}

.gateway-console-line-sdp {
    border-left-color: #7c3aed;
}

.gateway-console-line-ice {
    border-left-color: #0891b2;
}

.gateway-console-line-dns {
    border-left-color: #c026d3;
}

.gateway-console-line-timeout {
    border-left-color: #d97706;
}

.gateway-console-line-meta {
    margin-bottom: 0.32rem;
    font-size: 0.71rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gateway-console-time,
.gateway-console-stream,
.gateway-console-text-muted {
    color: #64748b;
}

.gateway-console-message {
    font-size: 0.83rem;
    line-height: 1.55;
    color: #0f172a;
    white-space: pre-wrap;
    word-break: break-word;
}

.gateway-sdp-prefix {
    color: #0f766e;
    font-weight: 700;
}

.gateway-sdp-value {
    color: #334155;
}

.gateway-console-text-critical {
    color: #be123c;
}

.gateway-console-text-warning,
.gateway-console-text-timeout {
    color: #b45309;
}

.gateway-console-text-sip {
    color: #0f766e;
}

.gateway-console-text-sdp {
    color: #334155;
}

.gateway-console-text-ice {
    color: #0d9488;
}

.gateway-console-text-dns {
    color: #475569;
}

.gateway-console-text-webrtc {
    color: #0f766e;
}

@media (max-width: 820px) {
    .gateway-console-modal-header,
    .gateway-console-toolbar {
        align-items: stretch;
    }

    .gateway-console-toolbar {
        width: 100%;
    }

    .gateway-console-badge,
    .gateway-console-filter,
    .gateway-console-clear {
        letter-spacing: 0.05em;
    }

    .gateway-console-shell {
        padding: 0.85rem 1rem 1rem;
    }

    .gateway-console-controls,
    .gateway-console-modal-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
