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

.nextlist-apply-workflow .page-header-wrapper {
  border: 1px solid var(--border-light-mode);
  margin: -20px -20px 0.5rem -20px;
  background-color: var(--background-color-main-light);
  padding: 40px 20px;
  text-align: center;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.nextlist-apply-workflow .page-header {
  margin-bottom: 0 !important;
}

.nextlist-apply-workflow .header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 0.25rem;
}

.nextlist-apply-workflow .header-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nextlist-apply-workflow .page-title {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nextlist-apply-workflow .page-title i {
  color: var(--primary-color);
  font-size: 1.5rem;
}

.nextlist-apply-workflow .page-subtitle {
  font-size: 0.95rem;
  color: var(--text-thowine-light);
  margin: 0;
}

.nextlist-apply-workflow .catalog-main-container {
  border: 1px solid var(--border-light-mode);
  border-radius: 0 0 12px 12px;
  background-color: var(--background-color-main-light);
  margin: 0 -20px;
  padding: 20px 24px;
}

.nextlist-apply-workflow .catalog-toolbar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
}

.nextlist-apply-workflow .search-group {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.nextlist-apply-workflow .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-thowine-light);
  font-size: 0.875rem;
}

.nextlist-apply-workflow .search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  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;
  outline: none;
  box-sizing: border-box;
}

.nextlist-apply-workflow .search-input:focus {
  border: 2px solid var(--primary-color);
}

.nextlist-apply-workflow .filter-group {
  flex: 1;
  min-width: 160px;
}

.nextlist-apply-workflow .filter-group--small {
  flex: 0 0 160px;
}

.nextlist-apply-workflow .filter-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light-mode);
  border-radius: 6px;
  font-size: 14px;
  background-color: var(--background-inputs-light-mode);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
  box-sizing: border-box;
}

.nextlist-apply-workflow .filter-select:focus {
  border: 2px solid var(--primary-color);
}

.nextlist-apply-workflow .data-list-container {
  border: 1px solid var(--border-light-mode);
  border-radius: 8px;
  overflow: hidden;
}

.nextlist-apply-workflow .data-list-header {
  display: grid;
  grid-template-columns: 100px 1fr 80px 140px 160px 60px;
  gap: 0;
  padding: 12px 16px;
  background-color: var(--background-color-main-light);
  border-bottom: 1px solid var(--border-light-mode);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-thowine-light);
  text-transform: uppercase;
}

.nextlist-apply-workflow .data-list-body {
  display: flex;
  flex-direction: column;
}

.nextlist-apply-workflow .data-list-row {
  display: grid;
  grid-template-columns: 100px 1fr 80px 140px 160px 60px;
  gap: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light-mode);
  align-items: center;
  transition: background-color 0.15s;
}

.nextlist-apply-workflow .data-list-row:last-child {
  border-bottom: none;
}

.nextlist-apply-workflow .data-list-row:hover {
  background-color: var(--background-color-main-light);
}

.nextlist-apply-workflow .col-code {
  font-family: "Courier New", monospace;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-thowine-light);
}
html.dark-theme .nextlist-apply-workflow .col-code {
  color: var(--text-thowine-dark);
}

.nextlist-apply-workflow .workflow-code-badge {
  display: inline-block;
  background-color: var(--primary-color);
  color: var(--text-thowine-black-light);
  border: 1px solid rgba(var(--primary-rgb, 59, 130, 246), 0.2);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: monospace;
}

.nextlist-apply-workflow .col-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-thowine-light);
}

.nextlist-apply-workflow .col-steps {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-thowine-light);
  text-align: center;
}

html.dark-theme .nextlist-apply-workflow .col-steps {
  color: var(--text-thowine-dark);
}

.nextlist-apply-workflow .steps-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: var(--background-color-main-light);
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-thowine-light);
}

.nextlist-apply-workflow .col-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-thowine-light);
  white-space: nowrap;
}

.nextlist-apply-workflow .col-author {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-thowine-light);
}

.nextlist-apply-workflow .col-actions {
  display: flex;
  justify-content: center;
}

.nextlist-apply-workflow .btn-aplicar {
  padding: 6px 14px;
  background-color: var(--primary-color);
  color: var(--text-thowine-black-light);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nextlist-apply-workflow .btn-aplicar:hover {
  opacity: 0.9;
}

.nextlist-apply-workflow .catalog-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  font-size: 0.95rem;
  color: var(--text-thowine-light);
  gap: 0.75rem;
}

.nextlist-apply-workflow .catalog-loading i {
  animation: aw-spin 1s linear infinite;
}

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

.nextlist-apply-workflow .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.nextlist-apply-workflow .empty-icon {
  font-size: 4rem;
  color: var(--text-thowine-light);
  margin-bottom: 1rem;
}

.nextlist-apply-workflow .empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.nextlist-apply-workflow .empty-message {
  font-size: 0.95rem;
  color: var(--text-thowine-light);
  margin: 0;
}

.nextlist-apply-workflow .pagination-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 0 0.5rem;
}

.nextlist-apply-workflow .pagination-info {
  font-size: 0.8125rem;
  color: var(--text-thowine-light);
}

.nextlist-apply-workflow .cs-container--error .cs-display {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.nextlist-apply-workflow .modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.nextlist-apply-workflow .modal-container {
  background-color: var(--background-color-main-light);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nextlist-apply-workflow .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background-color: var(--primary-color);
  flex-shrink: 0;
}

.nextlist-apply-workflow .modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-thowine-black-light);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
html.dark-theme .nextlist-apply-workflow .modal-title {
  color: var(--primary-color-contrast);
}
.nextlist-apply-workflow .modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 1rem;
  transition: all 0.2s;
}

.nextlist-apply-workflow .modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--text-thowine-light);
}

.nextlist-apply-workflow .modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nextlist-apply-workflow .step-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.nextlist-apply-workflow .step-description {
  font-size: 0.875rem;
  color: var(--text-thowine-light);
  margin: 0;
  line-height: 1.5;
}

.nextlist-apply-workflow .workflow-start-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

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

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

.nextlist-apply-workflow .workflow-steps-preview {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nextlist-apply-workflow .workflow-steps-preview-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.nextlist-apply-workflow .workflow-step-preview-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light-mode);
  border-radius: 8px;
  background-color: var(--background-main);
}

.nextlist-apply-workflow .workflow-step-preview-number {
  width: 28px;
  height: 28px;
  background-color: var(--primary-color);
  color: var(--text-thowine-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

html.dark-theme .nextlist-apply-workflow .workflow-step-preview-number {
  color: var(--text-thowine-dark);
}

.nextlist-apply-workflow .workflow-step-preview-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nextlist-apply-workflow .workflow-step-preview-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.nextlist-apply-workflow .workflow-step-preview-checklist {
  font-size: 0.8rem;
  color: var(--text-thowine-light);
}

.nextlist-apply-workflow .workflow-step-preview-arrow {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 0 1rem;
}

.nextlist-apply-workflow .modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light-mode);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nextlist-apply-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-apply-workflow .btn-primary {
  background-color: var(--primary-color);
  color: var(--btn-secundary-text-color);
  font-weight: 700;
}

.nextlist-apply-workflow .btn-secondary {
  background-color: var(--btn-secundary-color);
  color: var(--btn-secundary-text-color);
  border: var(--border-type);
}

html.dark-theme .nextlist-apply-workflow .btn-secondary {
  background-color: var(--background-main-dark-mode);
  color: var(--text-thowine-dark);
}

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

html.dark-theme .nextlist-apply-workflow .page-title,
html.dark-theme .nextlist-apply-workflow .col-name,
html.dark-theme .nextlist-apply-workflow .step-title,
html.dark-theme .nextlist-apply-workflow .workflow-start-label,
html.dark-theme .nextlist-apply-workflow .workflow-step-preview-name,
html.dark-theme .nextlist-apply-workflow .empty-title {
  color: var(--text-thowine-dark);
}

html.dark-theme .nextlist-apply-workflow .page-subtitle,
html.dark-theme .nextlist-apply-workflow .col-date,
html.dark-theme .nextlist-apply-workflow .col-author,
html.dark-theme .nextlist-apply-workflow .step-description,
html.dark-theme .nextlist-apply-workflow .workflow-step-preview-checklist,
html.dark-theme .nextlist-apply-workflow .empty-message {
  color: var(--text-thowine-dark);
}

html.dark-theme .nextlist-apply-workflow .catalog-main-container {
  background-color: var(--background-dark-mode-menu-lateral);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-apply-workflow .data-list-container {
  border-color: var(--border-dark-mode);
}

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

html.dark-theme .nextlist-apply-workflow .data-list-row {
  border-color: var(--border-dark-mode);
  background-color: var(--background-main-dark-mode);
}

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

html.dark-theme .nextlist-apply-workflow .modal-container {
  background-color: var(--background-dark-mode-menu-lateral);
}

html.dark-theme .nextlist-apply-workflow .modal-footer {
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-apply-workflow .workflow-step-preview-item {
  background-color: var(--background-main-dark-mode);
  border-color: var(--border-dark-mode);
}

html.dark-theme .nextlist-apply-workflow .steps-badge {
  background-color: var(--background-dark-mode);
  color: var(--text-thowine-dark);
}

/* ─── RESPONSIVIDADE ─────────────────────────────────────── */
@media (max-width: 768px) {
  .nextlist-apply-workflow .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .nextlist-apply-workflow .filter-group,
  .nextlist-apply-workflow .filter-group--small {
    flex: 1;
  }

  .nextlist-apply-workflow .data-list-header,
  .nextlist-apply-workflow .data-list-row {
    grid-template-columns: 80px 1fr 60px;
  }

  .nextlist-apply-workflow .col-date,
  .nextlist-apply-workflow .col-author {
    display: none;
  }
}
