/**
 * Custom CSS - Non-Webflow styles
 * These are custom styles that supplement the Webflow-generated CSS
 */

/* COMMON STYLES */

/* Header Logo styling */
.header-logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--_colors---bw-600);
  margin-right: 24px;
  text-decoration: none;
}

/* Inline rename (workflow / column names) */
.inline-editable {
  cursor: text;
  border-radius: 8px;
}

.cell-edit-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--_colors---bw-250);
  border-radius: 6px;
  outline: none;
  padding: 4px 6px;
  margin: 0;
}

.cell-edit-input:focus {
  outline: none;
  border-color: var(--_colors---bw-250);
}

.inline-editable:hover {
  background: rgba(0, 0, 0, 0.04);
}

.inline-edit-input {
  width: 100%;
  min-width: 120px;
  box-sizing: border-box;
  font: inherit;
  color: inherit;
  background: var(--_colors---bw-100);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 8px;
  padding: 4px 8px;
  outline: none;
}

.inline-edit-input:focus {
  border-color: var(--_colors---blue);
}

/* Dashboard workflow card title alignment */
.workflow-card .workflow-header {
  justify-content: flex-start;
  min-width: 100%;
  max-width: 100%;
}

.workflow-card a.workflow-header {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.workflow-card .workflow-title {
  text-align: left;
}

/* ==========================================================================
   DOCUMENTS PAGE - Save feedback and list representation
   ========================================================================== */

.document-save-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 20px;
  background: var(--_colors---bw-600);
  color: var(--_colors---bw-100);
  font-size: 14px;
  font-weight: 500;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 100;
  pointer-events: none;
}

.document-save-toast.visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.document-preview-just-saved {
  border-color: var(--_colors---blue) !important;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.document-footer-delete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-image: none !important;
}

.document-footer-delete img {
  flex-shrink: 0;
}

/* ==========================================================================
   MODAL STYLES (Used in dashboard, workflow-config, agent-config)
   ========================================================================== */
/* MODAL STYLES */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--_colors---bw-100);
  border-radius: 24px;
  width: 100%;
  padding: 16px;
  max-width: 600px;
  max-height: 85vh;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0px;
  border-bottom: 1px solid var(--_colors---bw-250);
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--_colors---bw-600);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--_colors---bw-200);
  color: var(--_colors---bw-500);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--_colors---bw-250);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--_colors---bw-250);
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--_colors---bw-600);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* FORM STYLES */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--_colors---bw-600);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--_colors---bw-250);
  border-radius: 12px;
  font-size: 14px;
  background: var(--_colors---bw-100);
  color: var(--_colors---bw-600);
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--_colors---blue);
}

textarea.form-control {
  min-height: 200px;
  font-family: monospace;
  resize: vertical;
}

.form-field {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--_colors---bw-250);
  border-radius: 12px;
  background: var(--_colors---bw-200);
  color: var(--_colors---bw-600);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
}

.form-field:focus {
  outline: none;
  border-color: var(--_colors---blue);
}

.form-field-label {
  font-size: 12px;
  color: var(--_colors---bw-350);
  margin-bottom: 6px;
  display: block;
}

.form-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.form-row .form-group {
  flex: 1;
}

textarea.form-field {
  min-height: 120px;
  resize: vertical;
  font-family: 'Courier New', monospace;
}

/* BUTTON STYLES */

.btn {
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
}

.btn-secondary {
  background: var(--_colors---bw-200);
  color: var(--_colors---bw-600);
}

.btn-secondary:hover {
  background: var(--_colors---bw-250);
}

.btn-primary {
  background: var(--_colors---blue);
  color: white;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-danger {
  background: rgba(255, 59, 48, 0.1);
  color: var(--_colors---red);
}

.btn-danger:hover {
  background: rgba(255, 59, 48, 0.2);
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-edit {
  background: var(--_colors---blue-100);
  color: var(--_colors---blue);
}

.btn-delete {
  background: rgba(255, 59, 48, 0.1);
  color: var(--_colors---red);
}

/* FILE UPLOAD STYLES */

.file-upload {
  border: 2px dashed var(--_colors---bw-250);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.file-upload:hover {
  border-color: var(--_colors---blue);
  background: var(--_colors---bw-200);
}

.file-upload.has-file {
  border-color: var(--_colors---blue);
  background: var(--_colors---bw-200);
}

.file-upload input[type="file"] {
  display: none;
}

.file-upload-text {
  color: var(--_colors---bw-500);
  font-size: 14px;
}

.file-upload-text strong {
  color: var(--_colors---blue);
}

/* DASHBOARD CONTENT & WORKFLOWS HEADER */

.dashboard-content {
  padding: 24px 33px 0;
}

.dashboard-section-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--_colors---bw-600);
  margin: 0 0 16px 0;
}

.workflow-list-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  width: fit-content;
}

.workflow-list-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--_colors---bw-600);
  margin: 0;
}

.add-workflow-dropdown {
  position: relative;
}

.add-workflow-toggle {
  cursor: pointer;
}

.add-workflow-menu {
  min-width: 120px;
}

/* PERIOD TAB STYLES */

.period-tab.active {
  color: var(--_colors---blue);
  font-weight: 600;
}

.period-tab {
  cursor: pointer;
}

/* LOADING STYLES */

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 250, 250, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--_colors---bw-250);
  border-top-color: var(--_colors---blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* EMPTY STATE STYLES */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--_colors---bw-400);
  background: var(--_colors---bw-100);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 20px;
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.5;
  color: var(--_colors---bw-350);
}

.empty-state h3 {
  margin: 0 0 8px 0;
  color: var(--_colors---bw-500);
  font-size: 18px;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* AGENT CONFIG PAGE STYLES */

/* Status indicators - dim by default, shown via JS when active */
.item-edit-card .item-edit-header .status {
  opacity: 0.3;
  transition: opacity 0.2s;
}

.item-edit-card .item-edit-header .status.active-status {
  opacity: 1;
}

/* Alert/error icons - hidden by default, shown via JS */
.item-edit-card .workflow-status-alert,
.item-edit-card .workflow-status-error {
  display: none;
}

.item-edit-card .workflow-status-alert.visible,
.item-edit-card .workflow-status-error.visible {
  display: block;
}

/* Stack drag-over state */
.stack.drag-over {
  border-color: var(--_colors---blue);
  background: var(--_colors---blue-100);
}

/* Stack name editable state */
.stack-name.editable {
  cursor: text;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
}

.stack-name.editable:hover {
  background: var(--_colors---bw-200);
}

.items-list a.item {
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

/* Item cards - additional states */
.item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.item.drag-placeholder {
  background: var(--_colors---blue-100);
  border: 2px dashed var(--_colors---blue);
  height: 60px;
  margin-bottom: 8px;
}

.item-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--_colors---bw-600);
}

.item-type {
  font-size: 12px;
  color: var(--_colors---bw-400);
  margin-top: 2px;
}

/* Workflow config: agent card status row (Active / Busy… / Hold / Fail / Done) */
.item-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2px;
  gap: 6px;
}

.item-status-row .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.item-status-row .text._14 {
  font-size: 12px;
  color: var(--_colors---bw-400);
}

/* Item delete icon */
.item .item-delete {
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

.item:hover .item-delete {
  opacity: 1;
}

.item .item-delete:hover {
  opacity: 0.7;
}

/* TABLES PAGE - show delete icons on hover only */

/* Column delete icon: only show when hovering the column name */
.table-icon-delete-column {
  opacity: 0;
  transition: opacity 0.15s ease;
  cursor: pointer;
}

.table-header-field-name:hover + .table-icon-delete-column,
.table-icon-delete-column:hover {
  opacity: 1;
}

/* Row delete icon: show when hovering the row */
.table-icon-delete-row {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  cursor: pointer;
}

.fs-table_row:hover .table-icon-delete-row,
.table-icon-delete-row:hover {
  opacity: 1;
  pointer-events: auto;
}

/* Item edit panel - active state */
.item-edit.active {
  display: flex;
}

.item-view {
  overflow-y: auto;
  max-height: 90vh;
}

.item-edit-header-text {
  white-space: pre-wrap;
  font-family: 'Inter', sans-serif;
  min-height: 100px;
  max-height: 300px;
  padding: 12px;
  border: 1px solid var(--_colors---bw-250);
  border-radius: 12px;
  background: var(--_colors---bw-200);
}

.item-edit-header-text:focus {
  outline: none;
  border-color: var(--_colors---blue);
}

/* Horizontal divider variant */
.divider.h {
  margin: 16px 0;
}

/* Tool list */
.tool-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-height: 150px;
  overflow-y: auto;
}

.tool-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--_colors---bw-200);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 12px;
}

.tool-item-row:hover {
  border-color: var(--_colors---blue);
}

.tool-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tool-item-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--_colors---bw-600);
}

.tool-item-type {
  font-size: 12px;
  color: var(--_colors---bw-350);
}

.tool-item-actions {
  display: flex;
  gap: 8px;
}

.empty-tools {
  text-align: center;
  padding: 24px;
  color: var(--_colors---bw-350);
  font-size: 14px;
}

/* Item type badges */
.item-type-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.item-type-badge.agent {
  background: rgba(88, 86, 214, 0.15);
  color: var(--_colors---indigo);
}

.item-type-badge.humanagent {
  background: rgba(255, 149, 0, 0.15);
  color: var(--_colors---orange);
}

.item-type-badge.router {
  background: rgba(59, 130, 246, 0.15);
  color: var(--_colors---blue);
}

.item-type-badge.end {
  background: rgba(107, 114, 128, 0.15);
  color: #374151;
}

/* Workflow badge in header */
.workflow-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--_colors---blue-100);
  border-radius: 20px;
  font-size: 12px;
  color: var(--_colors---blue);
  margin-left: 12px;
}

.header-workflow-left-group .svg-icon {
  cursor: pointer;
}

.header-workflow-left-group .svg-icon:hover {
  color: var(--_colors---blue);
}

/* WORKFLOW CONFIG PAGE STYLES */
.body-workflow {
  background-color: var(--_colors---bw-200);
  color: var(--_colors---bw-600);
  min-width: 1200px;
  max-width: 1920px;
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 120%;
}

.stack-list {
  grid-column-gap: 8px;
  grid-row-gap: 8px;
  padding-left: 32px;
  padding-right: 32px;
  overflow: scroll;
}

.stack {
  border: 1px solid var(--_colors---bw-250);
  background-color: var(--_colors---bw-100);
  border-radius: 24px;
  justify-content: flex-start;
  align-items: center;
  min-width: 320px;
  max-width: 320px;
  overflow: visible;
}

/* Stack dropdown: show list on hover */
.stack-dropdown {
  position: relative;
}

.stack-dropdown .dropdown-list,
.stack-dropdown .w-dropdown-list {
  display: none;
  z-index: 25;
}

.stack-dropdown:hover .dropdown-list,
.stack-dropdown:hover .w-dropdown-list,
.stack-dropdown .dropdown-list.w--open,
.stack-dropdown .w-dropdown-list.w--open {
  display: block;
}

/* Header workflow left - clickable back */
.header-workflow-left {
  cursor: pointer;
}

/* Header workflow left hover state */
.header-workflow-left:hover .button-icon {
  opacity: 0.7;
}

/* WORKFLOW VARIABLES PAGE STYLES */

.variables-page .fs-table_wrapper {
  padding: 40px;
  font-size: 14px;
}

.variables-page .variables-heading {
  font-size: 32px;
  margin-top: 0;
  margin-bottom: 16px;
}

.variables-page .btn-create {
  background-color: var(--_colors---blue);
  color: var(--_colors---bw-100);
  padding: 6px 11px 6px 14px;
  border: none;
  border-radius: 90px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 200;
}

.variables-page .btn-create:hover {
  opacity: 0.8;
}

.variables-page .variables-create-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.variables-page .variables-create-row input {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  min-width: 200px;
}

.variables-page .btn-delete-var {
  background-color: transparent;
  color: var(--_colors---bw-500);
  border: none;
  padding: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.variables-page .btn-delete-var:hover {
  color: var(--_colors---bw-600);
}

.variables-page .btn-delete-var img {
  width: 18px;
  height: 18px;
  display: block;
  filter: brightness(0) saturate(100%) invert(40%);
}

.variables-page .fs-table_body tr .btn-delete-var {
  opacity: 0;
}

.variables-page .fs-table_body tr:hover .btn-delete-var {
  opacity: 1;
}

.variables-page .variables-table .fs-table_cell--action {
  width: 48px;
  text-align: right;
}

.variables-page .variables-table .fs-table_header--action {
  width: 48px;
}

.variables-page .fs-table_container {
  margin-top: 30px;
}

/* Modal content variations */
.modal-content.small {
  max-width: 400px;
  padding: 24px;
}

/* Add column button */
.add-column-btn {
  min-width: 200px;
  height: 100px;
  border: 2px dashed var(--_colors---bw-300);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--_colors---bw-400);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  flex-shrink: 0;
}

.add-column-btn:hover {
  border-color: var(--_colors---blue);
  color: var(--_colors---blue);
  background: var(--_colors---blue-100);
}

/* Empty items */
.empty-items {
  text-align: center;
  padding: 24px;
  color: var(--_colors---bw-350);
  font-size: 13px;
}

/* Dropdown link danger variant */
.dropdown-link-danger {
  color: var(--_colors---red) !important;
}

.dropdown-link-danger:hover {
  background-color: rgba(255, 59, 48, 0.1) !important;
}

/* Agent Type Selection Grid */
.agent-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.agent-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: var(--_colors---bw-200);
  border: 2px solid var(--_colors---bw-250);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.agent-type-option:hover {
  border-color: var(--_colors---blue);
  background: var(--_colors---bw-150);
}

.agent-type-option.selected {
  border-color: var(--_colors---blue);
  background: var(--_colors---blue-100);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.agent-type-icon-lg {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 6px;
}

.agent-type-icon-lg img {
  border-radius: 10px;
}

.agent-type-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--_colors---bw-600);
  margin-bottom: 2px;
}

.agent-type-desc {
  font-size: 10px;
  color: var(--_colors---bw-400);
  line-height: 1.2;
}

/* Add Action Modal - ensure footer is visible */
#addActionModal .modal-content {
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#addActionModal .modal-body {
  flex: 1;
  overflow-y: auto;
  max-height: none;
}

#addActionModal .modal-footer {
  flex-shrink: 0;
  padding: 20px 24px;
  border-top: 1px solid var(--_colors---bw-250);
  background: var(--_colors---bw-100);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Agent type icons */
.agent-type-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.agent-type-icon img {
  border-radius: 8px;
}

/* Email selector dropdown (used in Read Email config) */
.selector {
  display: flex;
  align-items: center;
  position: relative;
  width: fit-content;
}

.selector-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--_colors---bw-300, #e0e0e0);
  border-radius: 20px;
  padding: 8px 32px 8px 16px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: var(--_colors---bw-600, #545454);
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239ca3af' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  min-width: 180px;
}

.selector-select:hover {
  border-color: var(--_colors---bw-400, #9ca3af);
}

.selector-select:focus {
  border-color: var(--_colors---blue, #3b82f6);
}

/* SERVICES PAGE STYLES */

/* Fix for Dropdowns on services page */
.w-dropdown-list {
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 150px;
}

.w-dropdown-link {
  padding: 0.5rem 1rem;
  color: #374151;
  transition: background-color 0.2s;
}

.w-dropdown-link:hover {
  background-color: #f3f4f6;
  color: #111827;
}

/* WORKFLOW EXECUTIONS PAGE STYLES */

.executions-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--_colors---bw-600);
  margin: 0;
}

.page-subtitle {
  font-size: 14px;
  color: var(--_colors---bw-350);
  margin-top: 4px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--_colors---bw-100);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 16px;
  margin-bottom: 24px;
}

.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--_colors---bw-500);
}

.filter-select {
  padding: 10px 40px 10px 14px;
  background: var(--_colors---bw-200);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 10px;
  color: var(--_colors---bw-600);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  font-family: 'Inter', sans-serif;
}

.filter-select:hover {
  border-color: var(--_colors---blue);
}

/* Execution Card */
.execution-card {
  background: var(--_colors---bw-100);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

a.execution-card {
  display: block;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.execution-card:hover {
  border-color: var(--_colors---bw-200);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.execution-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.execution-icon {
  font-size: 28px;
}

.execution-id {
  font-size: 18px;
  font-weight: 600;
  color: var(--_colors---bw-600);
}

.execution-status-badge {
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
}

.execution-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--_colors---bw-250);
}

.execution-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  color: var(--_colors---bw-400);
  font-size: 12px;
  font-weight: 500;
}

.detail-value {
  color: var(--_colors---bw-600);
  font-size: 14px;
  font-weight: 500;
}

.detail-value.error {
  color: var(--_colors---red);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding: 20px;
}

.pagination-info {
  color: var(--_colors---bw-400);
  font-size: 14px;
}

/* Header nav items for executions page */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav-item {
  padding: 8px 16px;
  color: var(--_colors---bw-500);
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
}

.header-nav-item:hover {
  background: var(--_colors---bw-200);
  color: var(--_colors---bw-600);
}

.header-nav-item.active {
  background: var(--_colors---blue-100);
  color: var(--_colors---blue);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-user-email {
  font-size: 14px;
  color: var(--_colors---bw-400);
}

/* END NODE AVATAR ICON */

.text-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

/* OAUTH CALLBACK PAGE STYLES */

.oauth-callback-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.oauth-callback-page .message {
  text-align: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.oauth-callback-page .spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: oauth-spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes oauth-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* SERVICES PAGE (connectors.css) */

/* Services Container */
.services-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  gap: 32px;
}

.services-sidebar {
  width: 340px;
  flex-shrink: 0;
}

.services-detail {
  flex: 1;
  background: var(--_colors---bw-100);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 24px;
  padding: 40px;
  min-height: 600px;
  position: sticky;
  top: 100px;
}

.services-header {
  margin-bottom: 24px;
}

.service-section {
  margin-bottom: 32px;
}

.service-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--_colors---bw-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  padding-left: 8px;
}

.service-item {
  background: var(--_colors---bw-100);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.service-item:hover {
  border-color: var(--_colors---blue);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.service-item.active {
  border-color: var(--_colors---blue);
  background: var(--_colors---blue-100);
}

.service-item-icon {
  width: 44px;
  height: 44px;
  background: var(--_colors---bw-200);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.service-item-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--_colors---bw-600);
  margin-bottom: 2px;
}

.service-item-info p {
  font-size: 13px;
  color: var(--_colors---bw-400);
}

.service-detail-view {
  display: none;
}

.service-detail-view.active {
  display: block;
  animation: services-fadeIn 0.3s ease-out;
}

@keyframes services-fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.detail-icon {
  width: 80px;
  height: 80px;
  background: var(--_colors---bw-200);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.detail-info h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--_colors---bw-600);
  margin-bottom: 8px;
}

.detail-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.detail-description {
  font-size: 16px;
  color: var(--_colors---bw-500);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 600px;
}

.detail-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Services Buttons */
.services-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: var(--_colors---main);
  text-decoration: none;
  background-color: var(--_colors---blue);
  color: white;
  line-height: 1;
}

.services-page .btn:hover {
  opacity: 0.9 !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
}

.btn-disconnect {
  background: transparent;
  color: var(--_colors---bw-400);
  border: none;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-disconnect:hover {
  color: var(--_colors---red);
}

.setup-notification-info {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--_colors---bw-250);
}

/* Services Accounts Section */
.accounts-section {
  max-width: 1600px;
  margin: 0 auto;
}

.accounts-section-header {
  margin-bottom: 24px;
}

.accounts-section-header h2 {
  font-size: 24px;
  color: var(--_colors---bw-600);
  margin-bottom: 8px;
}

.accounts-section-header p {
  color: var(--_colors---bw-400);
  font-size: 14px;
}

.accounts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-item {
  background: var(--_colors---bw-100);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 14px;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s;
}

.account-item:hover {
  border-color: var(--_colors---blue);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.account-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

.account-details h4 {
  color: var(--_colors---bw-600);
  font-size: 16px;
  margin-bottom: 6px;
}

.account-details p {
  color: var(--_colors---bw-400);
  font-size: 13px;
}

.account-actions {
  display: flex;
  gap: 10px;
}

/* Services Modal Table Styles */
.events-table {
  width: 100%;
  margin-top: 20px;
}

.events-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--_colors---bw-200);
  color: var(--_colors---bw-400);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.events-table td {
  padding: 16px;
  border-bottom: 1px solid var(--_colors---bw-250);
  color: var(--_colors---bw-600);
  font-size: 14px;
}

/* Services Availability */
.availability-results {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.availability-status {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.status-available {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-busy {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
}

.status-available .status-icon {
  background: #10b981;
  color: white;
}

.status-busy .status-icon {
  background: #ef4444;
  color: white;
}

.status-text h4 {
  color: var(--_colors---bw-600);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.status-text p {
  color: var(--_colors---bw-400);
  font-size: 14px;
  margin: 0;
}

.suggested-slots h5 {
  color: var(--_colors---bw-600);
  font-size: 14px;
  margin-bottom: 12px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.time-slot {
  background: var(--_colors---bw-200);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  color: var(--_colors---bw-600);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.time-slot:hover {
  border-color: var(--_colors---blue);
  background-color: var(--_colors---blue-100);
  color: var(--_colors---blue);
}

/* WORKFLOW EXECUTION PAGE STYLES */

/* Main Layout */
.workflow-exec .main-layout {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  background: transparent !important;
}

.workflow-exec .main-content {
  background: rgba(30, 41, 59, 0.4) !important;
  padding: 32px;
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
}

.workflow-exec .section-title {
  font-size: 20px;
  color: #e2e8f0;
  margin-bottom: 20px;
}

/* Workflow Exec Buttons */
.workflow-exec .btn {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: transform 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.workflow-exec .btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.workflow-exec .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.workflow-exec .btn-secondary {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
}

.workflow-exec .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.workflow-exec .btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

/* Workflow Exec Form Group */
.workflow-exec .form-group {
  margin-bottom: 20px;
}

.workflow-exec .form-group label {
  display: block;
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 8px;
}

.workflow-exec .form-group textarea {
  width: 100%;
  padding: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 150px;
}

.workflow-exec .form-group textarea:focus {
  outline: none;
  border-color: #60a5fa;
}

/* Node Visualization */
.node-flow {
  position: relative;
  height: calc(100vh - 480px);
  min-height: 600px;
  background: #0a0e1a;
  border-radius: 12px;
  overflow: auto;
  border: 1px solid #334155;
}

.dag-canvas {
  position: relative;
  min-height: 100%;
  width: fit-content;
  min-width: 100%;
}

.node-item {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  transition: all 0.3s;
  cursor: pointer;
  z-index: 10;
  box-sizing: border-box;
}

.node-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.2);
}

.node-item.pending {
  opacity: 0.5;
}

.node-item.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  animation: node-pulse 2s ease-in-out infinite;
}

.node-item.completed {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.node-item.failed {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
}

@keyframes node-pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
  }

  50% {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
  }
}

.node-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
  background: #334155;
  transition: all 0.3s;
}

.node-item.active .node-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  animation: node-spin 2s linear infinite;
}

.node-item.completed .node-icon {
  background: #10b981;
}

.node-item.failed .node-icon {
  background: #dc2626;
}

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

.node-info {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.node-name {
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-status {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.pending {
  background: #92400e;
  color: #fef3c7;
}

.status-badge.running {
  background: #1e40af;
  color: #dbeafe;
}

.status-badge.success {
  background: #065f46;
  color: #d1fae5;
}

.status-badge.failed {
  background: #991b1b;
  color: #fee2e2;
}

.status-badge.waiting {
  background: #7c3aed;
  color: #ede9fe;
}

/* Execution Status */
.execution-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  margin-bottom: 24px;
}

.workflow-exec .status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.workflow-exec .status-icon.running {
  background: #1e40af;
  animation: node-pulse 1.5s ease-in-out infinite;
}

.workflow-exec .status-icon.success {
  background: #10b981;
}

.workflow-exec .status-icon.failed {
  background: #dc2626;
}

.workflow-exec .status-icon.waiting {
  background: #7c3aed;
}

/* Results */
.result-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.result-box pre {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #94a3b8;
}

/* Approval Section */
.approval-section {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid #7c3aed;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  width: 100%;
  box-sizing: border-box;
}

.approval-section h3 {
  color: #e2e8f0;
  margin-bottom: 16px;
}

.approval-section input,
.approval-section textarea {
  box-sizing: border-box;
  max-width: 100%;
}

.approval-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.approval-actions .btn {
  flex: 1;
}

/* View Toggle */
.view-toggle {
  display: flex;
  gap: 8px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.view-toggle-btn {
  flex: 1;
  padding: 10px 20px;
  background: transparent;
  border: none;
  color: #94a3b8;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s;
}

.view-toggle-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
}

.view-toggle-btn:hover:not(.active) {
  background: rgba(59, 130, 246, 0.1);
  color: #e2e8f0;
}

/* Simple List View */
.simple-view {
  display: none;
}

.simple-view.active {
  display: block;
}

.dev-view {
  display: none;
}

.dev-view.active {
  display: block;
}

.simple-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: #0a0e1a;
  border-radius: 12px;
  border: 1px solid #334155;
  min-height: calc(100vh - 480px);
}

.simple-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 10px;
  transition: all 0.3s;
}

/* Input/Output Display */
.node-io-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .node-io-container {
    grid-template-columns: 1fr;
  }
}

.node-io-box {
  background: #0a0e1a;
  border-radius: 8px;
  padding: 14px;
  border: 1px solid #334155;
}

.node-io-box h5 {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.node-io-content {
  color: #e2e8f0;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 300px;
  overflow-y: auto;
}

.node-io-empty {
  color: #64748b;
  font-style: italic;
  font-size: 12px;
}

.simple-list-item.pending {
  opacity: 0.6;
  border-color: #475569;
}

.simple-list-item.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.simple-list-item.completed {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.simple-list-item.failed {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.05);
}

.simple-list-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: #334155;
  flex-shrink: 0;
  transition: all 0.3s;
}

.simple-list-item.pending .simple-list-icon {
  background: #475569;
}

.simple-list-item.active .simple-list-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  animation: node-pulse 2s ease-in-out infinite;
}

.simple-list-item.completed .simple-list-icon {
  background: #10b981;
}

.simple-list-item.failed .simple-list-icon {
  background: #dc2626;
}

.simple-list-content {
  flex: 1;
}

.simple-list-title {
  font-size: 16px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.simple-list-status {
  font-size: 13px;
  color: #94a3b8;
}

.simple-list-number {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  background: #1e293b;
  padding: 6px 12px;
  border-radius: 6px;
}

/* Simplified Input/Output */
.simple-input-box {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.simple-input-box label {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.simple-input-box input,
.simple-input-box textarea {
  width: 100%;
  padding: 12px;
  background: #0a0e1a;
  border: 1px solid #475569;
  border-radius: 6px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.simple-input-box input:focus,
.simple-input-box textarea:focus {
  outline: none;
  border-color: #60a5fa;
}

/* Execution Controls */
.execution-controls {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.execution-controls-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: end;
}

@media (max-width: 768px) {
  .execution-controls-grid {
    grid-template-columns: 1fr;
  }
}

.execution-controls .btn {
  width: auto;
  min-width: 140px;
}

.execution-controls textarea {
  width: 100%;
  padding: 12px;
  background: #0a0e1a;
  border: 1px solid #475569;
  border-radius: 8px;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
}

.execution-controls textarea:focus {
  outline: none;
  border-color: #60a5fa;
}

/* CLASSIFIER NODE EDITOR STYLES */

/* Classifier type badge */
.item-type-badge.classifier {
  background: rgba(6, 182, 212, 0.15);
  color: var(--_colors---cyan, #06b6d4);
}

/* Classifier IO Section */
.classifier-io-section {
  width: 100%;
  margin-bottom: 20px;
}

.classifier-io-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.classifier-connected-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Classifier Classes Section */
.classifier-classes-section {
  width: 100%;
  margin-bottom: 20px;
}

.classifier-class-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

.classifier-class-item {
  background: var(--_colors---bw-200);
  border: 1px solid var(--_colors---bw-250);
  border-radius: 16px;
  padding: 16px;
  gap: 12px;
}

.classifier-class-item:hover {
  border-color: var(--_colors---bw-300);
}

.classifier-class-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.classifier-class-name {
  flex: 1;
  font-weight: 600 !important;
}

.classifier-class-reference {
  width: 100%;
  min-height: 60px;
  resize: vertical;
}

.classifier-class-output {
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--_colors---bw-250);
  margin-top: 4px;
}

/* Pill remove icon */
.pill-remove {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.pill-remove:hover {
  opacity: 1;
}

/* IO Data Panels - code block styling */
.item-io .code-block {
  flex: 1;
  overflow: auto;
  border-radius: 8px;
  font-size: 12px;
  max-height: calc(100vh - 200px);
}

/* Agent type icon for Classifier */
.agent-type-icon.classifier {
  background: rgba(6, 182, 212, 0.15);
}

.execution-controls label {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* UNIFIED AGENT EDIT PANEL STYLES */

/* Type-specific content section inside the unified panel */
.type-content-section {
  width: 100%;
  padding: 0;
}

.type-content-section .form-group {
  margin-bottom: 16px;
}

.type-content-section .form-field {
  background: var(--_colors---bw-200);
  border: 1px solid var(--_colors---bw-250);
}

.type-content-section .form-field:focus {
  border-color: var(--_colors---blue);
  outline: none;
}

.type-content-section .form-field-label {
  font-size: 12px;
  color: var(--_colors---bw-350);
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
}

/* Tools list inside type content */
.type-content-section .tools-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
}

/* Classifier description text */
.type-content-section.classifier-description {
  padding: 12px 0;
}

/* Item edit class - additional states */
.item-edit-class:last-child {
  margin-bottom: 0;
}

/* Editable text fields in class items */
.item-edit-prompt-text.editable {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--_colors---bw-600);
}

.item-edit-prompt-text.editable:focus {
  outline: none;
}

/* Class name input styling */
input.item-edit-prompt-text.editable {
  padding: 4px 0;
  font-weight: 500;
  flex: 1;
}

/* Reference text textarea styling */
textarea.item-edit-prompt-text.editable {
  border: none;
  background: var(--_colors---bw-250);
  padding: 10px;
  border-radius: 8px;
  resize: vertical;
  min-height: 50px;
}

textarea.item-edit-prompt-text.editable:focus {
  background: var(--_colors---bw-200);
  box-shadow: 0 0 0 2px var(--_colors---blue-100);
}

/* Classifier classes section container */
#classifierClassesSection {
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 8px;
}

/* Add class button positioning */
#addClassButton {
  margin-top: 8px;
}

/* Unified panel item-edit-card adjustments */
.item-edit .item-edit-card {
  flex: 0 0 auto;
  width: 400px;
  max-width: 420px;
  margin: 60px auto;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

/* Show IO panels when visible */
.item-edit .item-io.visible,
.item-edit .item-io[style*="display: flex"] {
  display: flex;
}

/* Close button positioning */
.item-edit .close {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 101;
}

/* Unified panel layout - horizontal centering */
.item-edit.active {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding: 0 24px;
  overflow-y: auto;
}

/* AGENT NODE - PROMPT & SOURCE/TARGET STYLES */

/* Prompt section styling */
#promptSection {
  gap: 6px;
}

#promptSection .item-edit-prompt-text:first-child {
  font-size: 12px;
  color: var(--_colors---bw-350);
  font-weight: 500;
  min-height: auto;
  height: auto;
}

#editPromptField {
  transition: border-color 0.2s, box-shadow 0.2s;
}

#editPromptField:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--_colors---blue-100);
  background: var(--_colors---bw-200) !important;
}

/* Source/Target references section */
#sourceTargetSection {
  gap: 16px;
}

#sourceTargetSection .item-edit-reference {
  flex: 1;
}

#sourceReferencesList,
#targetReferencesList {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

/* Reference modal styling */
#referenceModal .modal-content {
  max-width: 440px;
}

#referenceModal .form-group {
  margin-bottom: 16px;
  padding: 0 24px;
}

#referenceModal .modal-actions {
  padding: 0 24px 24px;
}

/* Workflow toggle switch states */
.switch {
  background-color: var(--_colors---bw-300) !important;
  justify-content: flex-start !important;
}

.switch.on {
  background-color: var(--_colors---green) !important;
  justify-content: flex-end !important;
}