.form-fieldset {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.form-fieldset__legend {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0 var(--space-2);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.toggle-row:last-child {
  border-bottom: none;
}

.toggle-row__label {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.toggle-row__hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-0-5);
}

.detail-section {
  margin-bottom: var(--space-6);
}

.detail-section__title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

.empty-text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.form-page {
  max-width: 600px;
}

.form-page__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.danger-zone {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.danger-zone__title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--status-error);
  margin: 0 0 var(--space-2);
}

.danger-zone__hint {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
}

.code-inline {
  font-family: var(--font-mono);
  background: var(--surface-sunken);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
}

.code-block {
  background: var(--surface-sunken);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  overflow-x: auto;
  white-space: pre-wrap;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.text-link {
  color: var(--accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-link:hover {
  color: var(--accent-hover);
}

.inline-form {
  display: inline;
}

.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary  { color: var(--text-tertiary); }

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

  .step-editor__tree {
    max-height: 240px;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .account-dashboard__grid {
    grid-template-columns: 1fr;
  }

  .detail-row {
    flex-direction: column;
    gap: var(--space-1);
  }

  .detail-row__label {
    min-width: 0;
  }

  .form-row {
    flex-direction: column;
    gap: var(--space-4);
  }

  .resource-form__grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar__search {
    max-width: none;
  }

  .toolbar__field {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar__query {
    min-width: 0;
    flex-basis: auto;
  }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
}
