.nextlist-create-workflow {
  width: 100%;
  padding: 20px;
}

.nextlist-create-workflow .workflow-header-wrapper {
  margin: 0 -20px 0.5rem -20px;
  background-color: var(--background-color-main-light);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.nextlist-create-workflow .page-header {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 1rem;
  background-color: var(--background-color-main-light-gray);
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

html.dark-theme .nextlist-create-workflow .page-header {
  background-color: var(--background-dark-mode-menu-latera);
}

.nextlist-create-workflow .formulario-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-light-mode);
  margin-bottom: 2rem;
  border-radius: 0;
  background-color: var(--background-color-main-light-gray);
}

.nextlist-create-workflow .header-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

html.dark-theme .nextlist-create-workflow .header-content {
  background-color: var(--background-dark-mode-menu-lateral);
}

.nextlist-create-workflow .header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nextlist-create-workflow .header-center {
  text-align: center;
}

.nextlist-create-workflow .header-right {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.nextlist-create-workflow .page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.nextlist-create-workflow .page-breadcrumb {
  font-size: 0.8rem;
  color: var(--text-thowine-ligh);
  margin: 2px 0 0 0;
}

.nextlist-create-workflow .btn-link {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  transition: all 0.2s;
  width: 44px;
  height: 44px;
}

.nextlist-create-workflow .btn-link i {
  font-size: 1.1rem;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nextlist-create-workflow .btn-link:hover i {
  background-color: var(--primary-color);
  color: var(--text-thowine-light);
  transition: all 0.4s ease;
}

.nextlist-create-workflow .btn {
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
}

.nextlist-create-workflow .btn-primary {
  background-color: var(--primary-color);
  color: var(--text-thowine-black-light);
  margin-bottom: 1rem;
}

.nextlist-create-workflow .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

html.dark-theme .nextlist-create-workflow .btn-primary {
  color: var(--primary-color-contrast);
}

.nextlist-create-workflow .btn-secondary {
  background-color: var(--primary-color);
  color: var(--text-thowine-black-light);
  border: none;
}

html.dark-theme .nextlist-create-workflow .btn-secondary {
  color: var(--text-thowine-black-light);
}

.nextlist-create-workflow .btn-secondary:hover {
  opacity: 0.9;
}

.nextlist-create-workflow .tab-button {
  background: none;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-thowine-light);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0;
}

.nextlist-create-workflow .tab-button:hover {
  color: var(--text-primary);
}

.nextlist-create-workflow .tab-button.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.nextlist-create-workflow .tab-button i {
  font-size: 0.875rem;
}

.nextlist-create-workflow .tab-content {
  display: none;
}

.nextlist-create-workflow .tab-content.active {
  display: block;
}

.nextlist-create-workflow .form-container {
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--border-light-mode);
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
  margin: 0 -20px;
}

.nextlist-create-workflow .form-section {
  border-radius: inherit;
  padding: 0 0 1px 0 !important;
  min-height: 400px;
  background-color: var(--background-color-main-light);
}

html.dark-theme .nextlist-create-workflow .form-section {
  background-color: var(--background-dark-mode-menu-lateral);
}

.nextlist-create-workflow .section-title {
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  width: auto;
  align-self: flex-start;
  background-color: var(--primary-color);
  color: var(--text-thowine-black-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  min-height: 60px;
  border-bottom-right-radius: 65px;
}

html.dark-theme .nextlist-create-workflow .section-title {
  color: var(--text-thowine-black-light);
}

.nextlist-create-workflow .form-group {
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.nextlist-create-workflow .form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.nextlist-create-workflow .required {
  color: #dc2626;
  margin-left: 3px;
}

.nextlist-create-workflow .form-input,
.nextlist-create-workflow .form-select,
.nextlist-create-workflow .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light-mode);
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--background-main);
  color: var(--text-primary);
  transition: all 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

.nextlist-create-workflow .form-input:focus,
.nextlist-create-workflow .form-select:focus,
.nextlist-create-workflow .form-textarea:focus {
  outline: none;
  border: 2px solid var(--primary-color);
  padding: 9px 11px;
}

.nextlist-create-workflow .form-input--error {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}


.nextlist-create-workflow .form-input--readonly {
  background-color: var(--background-main);
  cursor: not-allowed;
  color: var(--text-thowine-light);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.nextlist-create-workflow .form-hint {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-thowine-light);
  margin-top: 0.375rem;
  line-height: 1.4;
}

.nextlist-create-workflow #responsaveis-hint {
  text-align: center;
}

.nextlist-create-workflow .form-error {
  display: none;
  font-size: 0.8125rem;
  color: #dc2626;
  margin-top: 0.375rem;
}

.nextlist-create-workflow .toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.nextlist-create-workflow .toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

.nextlist-create-workflow .toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.nextlist-create-workflow .toggle-slider {
  position: absolute;
  inset: 0;
  background-color: #d1d5db;
  border-radius: 28px;
  cursor: pointer;
  transition: background-color 0.25s;
}

.nextlist-create-workflow .toggle-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.nextlist-create-workflow .toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

.nextlist-create-workflow
  .toggle-switch
  input:checked
  + .toggle-slider::before {
  background-color: #ffffff;
  transform: translateX(24px);
}

/* --- TOGGLES NO DARK MODE --- */

html.dark-theme
  .nextlist-create-workflow
  .toggle-switch
  input
  + .toggle-slider {
  background-color: #333;
}

html.dark-theme
  .nextlist-create-workflow
  .toggle-switch
  input
  + .toggle-slider::before {
  background-color: #555;
}

html.dark-theme
  .nextlist-create-workflow
  .toggle-switch
  input:checked
  + .toggle-slider {
  background-color: var(--background-main-dark-mode);
}

html.dark-theme
  .nextlist-create-workflow
  .toggle-switch
  input:checked
  + .toggle-slider::before {
  transform: translateX(24px);
  background-color: var(--primary-color);
}

/* --- FIM DA ESTILIZAÇÃO DOS TOGGLES --- */

.nextlist-create-workflow .toggle-label {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.nextlist-create-workflow .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-light-mode);
}

.nextlist-create-workflow .workflow-steps-actions {
  padding: 0 1.5rem 1.5rem;
}

.nextlist-create-workflow .workflow-step-card {
  margin: 0 1.5rem 1rem;
  border: 1px solid var(--border-light-mode);
  border-radius: 10px;
  overflow: hidden;
  background-color: var(--background-color-main-light);
}

.nextlist-create-workflow .workflow-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 1rem;
  background-color: var(--background-color-main-light);
  border-bottom: 1px solid var(--border-light-mode);
}

.nextlist-create-workflow .workflow-step-badge {
  display: inline-flex;
  align-items: center;
  background-color: var(--primary-color);
  color: var(--text-thowine-black-light);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 60px 6px 20px;
  min-height: 50px;
  border-bottom-right-radius: 40px;
}

html.dark-theme .nextlist-create-workflow .workflow-step-badge {
  color: var(--text-thowine-black-light);
}

.nextlist-create-workflow .workflow-step-actions {
  display: flex;
  gap: 0.25rem;
}

.nextlist-create-workflow .workflow-step-body {
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nextlist-create-workflow .workflow-step-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.nextlist-create-workflow .workflow-step-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.nextlist-create-workflow .workflow-step-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.nextlist-create-workflow .workflow-step-copy {
  border-top: 1px solid var(--border-light-mode);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nextlist-create-workflow .workflow-step-copy-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nextlist-create-workflow .workflow-copy-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light-mode);
  border-radius: 8px;
}

.nextlist-create-workflow .workflow-copy-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nextlist-create-workflow .workflow-copy-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.nextlist-create-workflow .workflow-copy-hint {
  font-size: 0.8rem;
  color: var(--text-thowine-light);
  line-height: 1.4;
}

.nextlist-create-workflow .workflow-config-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light-mode);
}

.nextlist-create-workflow .workflow-config-item:last-child {
  border-bottom: none;
}

.nextlist-create-workflow .workflow-config-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nextlist-create-workflow .workflow-config-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.nextlist-create-workflow .workflow-config-hint {
  font-size: 0.8rem;
  color: var(--text-thowine-light);
  line-height: 1.4;
}

.nextlist-create-workflow .btn-icon {
  background: none;
  border: none;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--primary-color);
  border-radius: 4px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nextlist-create-workflow .btn-icon:hover {
  background-color: var(--background-color-main-light);
  color: var(--text-primary);
}

.nextlist-create-workflow .btn-icon.btn-danger:hover {
  background-color: #fee2e2;
  color: #dc2626;
}

.nextlist-create-workflow .btn-icon:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nextlist-create-workflow .loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--background-color-main-light);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.nextlist-create-workflow .loading-content {
  background-color: var(--background-color-main-light);
  border-radius: 12px;
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.nextlist-create-workflow .loading-content i {
  font-size: 2rem;
  color: var(--primary-color);
  animation: wf-spin 1s linear infinite;
}

.nextlist-create-workflow .loading-content p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

@keyframes wf-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

html.dark-theme .nextlist-create-workflow .workflow-header-wrapper {
  background-color: var(--background-dark-mode-menu-lateral);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-create-workflow .page-title,
html.dark-theme .nextlist-create-workflow .form-label,
html.dark-theme .nextlist-create-workflow .toggle-label,
html.dark-theme .nextlist-create-workflow .workflow-step-copy-title,
html.dark-theme .nextlist-create-workflow .workflow-copy-label,
html.dark-theme .nextlist-create-workflow .workflow-config-label {
  color: var(--text-thowine-dark);
}

html.dark-theme .nextlist-create-workflow .page-breadcrumb,
html.dark-theme .nextlist-create-workflow .form-hint,
html.dark-theme .nextlist-create-workflow .workflow-copy-hint,
html.dark-theme .nextlist-create-workflow .workflow-config-hint {
  color: var(--text-thowine-dark);
  margin-left: 25px;
}

html.dark-theme .nextlist-create-workflow .form-container,
html.dark-theme .nextlist-create-workflow .loading-content {
  background-color: var(--background-dark-mode);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-create-workflow .form-input,
html.dark-theme .nextlist-create-workflow .form-select,
html.dark-theme .nextlist-create-workflow .form-textarea {
  background-color: var(--background-main-dark-mode);
  color: var(--text-thowine-dark);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-create-workflow .form-input--readonly {
  background-color: var(--background-main-dark-mode);
  color: var(--text-thowine-dark);
}

html.dark-theme .nextlist-create-workflow .formulario-tabs {
  border-bottom-color: var(--border-dark-mode);
  background-color: var(--background-dark-mode-menu-lateral);
  border-radius: 0;
}

html.dark-theme .nextlist-create-workflow .tab-button:hover {
  color: var(--text-thowine-dark);
}

html.dark-theme .nextlist-create-workflow .form-actions {
  border-top-color: var(--border-dark-mode);
  background-color: var(--background-dark-mode-menu-lateral);
}

html.dark-theme .nextlist-create-workflow .workflow-step-card {
  background-color: var(--border-dark-mode);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-create-workflow .workflow-step-header {
  background-color: var(--background-dark-mode);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-create-workflow .workflow-copy-item,
html.dark-theme .nextlist-create-workflow .workflow-config-item {
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-create-workflow .btn-icon:hover {
  background-color: var(--background-dark-mode);
}

/* ─── RESPONSIVIDADE ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nextlist-create-workflow .header-content {
    grid-template-columns: 1fr;
  }

  .nextlist-create-workflow .header-right {
    width: 100%;
  }

  .nextlist-create-workflow .btn {
    width: 100%;
    justify-content: center;
  }

  .nextlist-create-workflow .formulario-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nextlist-create-workflow .form-actions {
    flex-direction: column-reverse;
  }

  .nextlist-create-workflow .workflow-step-row {
    grid-template-columns: 1fr;
  }
}

/* ─── INFO TOOLTIP ───────────────────────────────────────────── */
.nextlist-create-workflow .workflow-info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  cursor: pointer;
  color: var(--text-thowine-light);
  font-size: 1rem;
  flex-shrink: 0;
}

.nextlist-create-workflow .workflow-info-tooltip:hover {
  color: var(--primary);
}

.nextlist-create-workflow .workflow-info-tooltip::after {
  content: attr(data-tooltip);
  position: fixed;
  bottom: var(--tt-bottom, auto);
  left: var(--tt-left, 50%);
  top: auto;
  transform: translateX(-80%);
  background-color: var(--background-color-main-light);
  color: var(--text-thowine-light);
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 8px 12px;
  border-radius: 6px;
  width: 260px;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nextlist-create-workflow .workflow-info-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

.nextlist-create-workflow .workflow-config-toggle-group .workflow-info-tooltip::after {
  transform: translateX(-78%);
}

.nextlist-create-workflow .workflow-config-toggle-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
